variable height treenode

  • Thread starter Thread starter lord.zoltar
  • Start date Start date
L

lord.zoltar

Does anyone know if it is possible to have treenodes of varying height
all in the same treeview?
 
This is basically the same as the question you asked last month:http://groups.google.com/group/microsoft.public.dotnet.languages.csha...

Um yeah it kinda is. ;) I'm still working on it, albeit very slowly.
I.e. if you were able to draw the TreeView nodes in varying heights, you  
could easily also implement multi-line nodes.  You can't do either.

I got half-way, or so I thought... maybe not... I was easily able to
get multiline text for a treenode by adding some code to the tree's
DrawNode and setting the treeview's draw mode to OwnerDrawAll, but the
area that acknowledges mouse clicks for the node is still a single
line tall. I am guessing that the bounds for the nodes all get their
height from the treeview's ItemHeight, and the height doesn't depend
on what's being drawn. Somewhere, there must be a way to override
this...
Well, I'll keep at it... if anything interesting pops up I'll post
it. ;)
 
This is basically the same as the question you asked last month:http://groups.google.com/group/microsoft.public.dotnet.languages.csha...

Um yeah it kinda is. ;) I'm still working on it, albeit very slowly.
I.e. if you were able to draw the TreeView nodes in varying heights, you  
could easily also implement multi-line nodes.  You can't do either.

I got half-way, or so I thought... maybe not... I was easily able to
get multiline text for a treenode by adding some code to the tree's
DrawNode and setting the treeview's draw mode to OwnerDrawAll, but the
area that acknowledges mouse clicks for the node is still a single
line tall. I am guessing that the bounds for the nodes all get their
height from the treeview's ItemHeight, and the height doesn't depend
on what's being drawn. Somewhere, there must be a way to override
this...
Well, I'll keep at it... if anything interesting pops up I'll post
it. ;)
 
Back
Top