很容易的 我给你我用过可以的DELPHI隐藏有一个设置控件属性的函数(把这个函数拷贝到你的程序中) procedure SetComCtlStyle(Ctl: TWinControl; Value: Integer; UseStyle: Boolean); var Style: Integer; begin if Ctl.HandleAllocated then begin Style := GetWindowLong(Ctl.Handle, GWL_STYLE); if not UseStyle then Style := Style and not Value else Style := Style or Value; SetWindowLong(Ctl.Handle, GWL_STYLE, Style); end; end; 新版的WIN公共控件的TREEVIEW中有DELPHI中没有的风格定义 const TVS_CHECKBOXES = $0100; *****用下面的语句既可给TTREEVIEW加CHECKBOX SetComCtlStyle(TreeView1,TVS_CHECKBOXES,True);
[email protected]
可以发给我嘛?
[email protected]
谢谢!
我的MAIL:[email protected],我给你发MAIL,你看看有没有收到,没收到的话,你直接发到我这个信箱里吧!谢谢你了!
我给你我用过可以的DELPHI隐藏有一个设置控件属性的函数(把这个函数拷贝到你的程序中)
procedure SetComCtlStyle(Ctl: TWinControl; Value: Integer; UseStyle: Boolean);
var
Style: Integer;
begin
if Ctl.HandleAllocated then
begin
Style := GetWindowLong(Ctl.Handle, GWL_STYLE);
if not UseStyle then Style := Style and not Value
else Style := Style or Value;
SetWindowLong(Ctl.Handle, GWL_STYLE, Style);
end;
end;
新版的WIN公共控件的TREEVIEW中有DELPHI中没有的风格定义
const
TVS_CHECKBOXES = $0100;
*****用下面的语句既可给TTREEVIEW加CHECKBOX
SetComCtlStyle(TreeView1,TVS_CHECKBOXES,True);
,你说的取值,我不太清楚
你再详细说一下
就会打上勾
它的selected属性就是true了
不知道我说的你明白不明白
感谢
这么好的东西
收藏1!
---------------------------------------------------------------在TreeView中有一个Check的属性,是允许带有CheckBox,去找找,不用与Down
---------------------------------------------------------------1stclass中的fctreeview
www.51delphi.com---------------------------------------------------------------dx控件中的dxTreeView1可以設置
在delphi窯洞里有下載
---------------------------------------------------------------Rxlib控件组里面也有,强烈推荐这套控件组,功能非常强大