Groups | Blog | Home
all groups > dotnet windows forms controls > november 2004 >

dotnet windows forms controls : Resize Panel to Height of TreeView



George
11/29/2004 2:54:10 PM
I have a treeview which is added to a Expandable Panel.

I need to resize the panel so as all the nodes of the
treeview are being displayed. Is there anyway to get
the 'required' height of the treeview so I can set the
panel to this size.

Claes Bergefall
11/30/2004 9:02:41 AM
TVM_GETITEMHEIGHT will give you the height of each
individual node. Multiply that value with the number of nodes
and add some padding (you'll need to experiment a bit)

/claes

[quoted text, click to view]

AddThis Social Bookmark Button