>Using VS.NET 2003, VB:
>I have a TreeView object with lots of nodes. The treeview is docked on the
[quoted text clipped - 8 lines]
>the width of a TreeView's label? All I can find is the Text property - and
>that doesn't translate well into a pixel width.
You'll have to calculate the width yourself, using the
Graphics.MeasureString method. While I was looking for a link to give you,
I found that there's actually an example of this very thing on the MSDN
page about the Control.CreateGraphics method: http://shrinkster.com/87i
Oliver Sturm

Signature
Expert programming and consulting services available
See http://www.sturmnet.org (try /blog as well)
hzgt9b@nopost.com - 22 Sep 2005 13:50 GMT
Thanks for the link...
> >Using VS.NET 2003, VB:
> >I have a TreeView object with lots of nodes. The treeview is docked on the
[quoted text clipped - 15 lines]
>
> Oliver Sturm
hzgt9b@nopost.com - 30 Sep 2005 13:46 GMT
I need to inspect each node in the treeView. But unfortunately the
CreateGraphics() method is available for TreeNode objects. Any other ideas on
how to interrogate the tree node to gets its pixel width?
> >Using VS.NET 2003, VB:
> >I have a TreeView object with lots of nodes. The treeview is docked on the
[quoted text clipped - 15 lines]
>
> Oliver Sturm
Oliver Sturm - 30 Sep 2005 14:04 GMT
>I need to inspect each node in the treeView. But unfortunately the
>CreateGraphics() method is available for TreeNode objects. Any other ideas
>on
>how to interrogate the tree node to gets its pixel width?
You should be able to use any other Graphics object for the task. You
could query one from the TreeView control, or even create your own from a
bitmap or other source.
Oliver Sturm

Signature
Expert programming and consulting services available
See http://www.sturmnet.org (try /blog as well)