Reversing the direction of the MoenTreeView

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Reversing the direction of the MoenTreeView

Mikael Svane
I intended to subclass the MoenTreeView with a new class which draws the
anchor node to the right instead of to the left. Has anyone already done
this or could tell me where I should start?

Best regards,
Mikael Svane


Reply | Threaded
Open this post in threaded view
|

Re: Reversing the direction of the MoenTreeView

Chris Uppal-3
Mikael Svane wrote:

> I intended to subclass the MoenTreeView with a new class which draws the
> anchor node to the right instead of to the left. Has anyone already done
> this or could tell me where I should start?

I once started to look at the same thing.  It's fairly tricky since the
left-to-right-ness is hardcoded into the MoenTreeView code (which is
understandable since that code is intricate enough without further
parameterisation).  As I looked into it I found myself having to override more
and more rather complicated methods, and since I'm not good at visualisation at
the best of times, I got fustrated and gave up.  Allowing vertical layout
appears as if it would be even more bother.

If you try it based on the OA code, then I think you'll need a subclass of
MoenTreeNode too.  I hadn't found a need to replace MoenTreeContour by the time
I gave up.  I think if I were to try it again, I'd start from scratch rather
than trying to bend existing code; in particular I think it would be easier
/and/ more flexible to pull the layout stategy out into a separate object (but
then, I haven't tried it, so I could be wrong).

    -- chris