开发者

winforms control real client area

开发者 https://www.devze.com 2023-01-22 09:47 出处:网络
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 ne开发者_如何学Pythoned to know the real client area of the co

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 ne开发者_如何学Pythoned 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?


The ClientRectangle property might work for you.


Use ClientRectangle property.


Problem with ClientRectangle is that it includes the space for the menuStrip and the Status strip.

0

精彩评论

暂无评论...
验证码 换一张
取 消