没有发现treeview有设置滚动条的属性,我想把横向滚动条给去了,不知道哟什么方法没?
------解决方案--------------------
还有一种方法,也是API:
定义两个实例常量
constant int GWL_STYLE = -16
constant uLONG TVS_NOHSCROLL = 32768
定义两个外部函数声明
Function long GetWindowLong (ulong hWnd, int nIndex) Library "USER32.DLL " Alias for "GetWindowLongA "
Function long SetWindowLong (ulong hWnd, int nIndex, long dwNewLong) Library "USER32.DLL " Alias for "SetWindowLongA "
在程序中按照以下方法写
long ll_TVStyle
ll_TVStyle = GetWindowLong(Handle(tv_1),GWL_STYLE)
ll_TVStyle += TVS_NOHSCROLL
SetWindowLong(Handle(tv_1),GWL_STYLE,ll_TVStyle)