tags:

views:

14

answers:

2

Hello folks:

How can I know the real client area of a control?

I have an app with a treeview. I do some low level manipulation to this treeview and I need to know the real client area of the control. So far I have used TreeView.Height/Width, but when the tree grows and a horizontal or vertical scroll bar appears, some of this space is used by the scrollbars.

I need a way to know the usable screen space on the treeview (the client area sans the space taken by the scrollbars, if they are shown). How can I get those values?

+2  A: 

Use ClientRectangle property.

A_Nablsi
+3  A: 

The ClientRectangle property might work for you.

SwDevMan81