none
treeview中的滚动条问题 RRS feed

  • 问题

  • 如果判断,treeview控件中滚动条出现了?已经设置TreeView.Scrollable=ture,当出现滚动条的时候,想增加treeview的宽度。如何实现此功能,求高手解答?我用的是vb.net,vs2013   .NET Framework 4.5.1
    2015年1月12日 2:59

答案

  • 你好,

    MSDN文档里有怎么来检测滚动条的文章,你可以参考这里的代码:

    http://support.microsoft.com/kb/299686/en-us

    "Controls such as RichTextBox, TreeView, ListView, ListBox, DirListBox, and FileListBox do not offer built-in functionality to determine if a horizontal or vertical scroll bar is currently visible. This article demonstrates how to retrieve window style information about the control that can be used to determine if scroll bars are visible. " 

    因为默认没有所以只能用系统的Window Style来检测。



    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    2015年1月13日 7:55
    版主