台湾谢廷凯:给TreeView添加复选框
来源:百度文库 编辑:中财网 时间:2024/05/10 07:25:43
给TreeView添加复选框
分类: Delphi 2009-03-03 16:57 295人阅读 评论(0) 收藏 举报[delphi] view plaincopy?
- unit Unit1;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, ComCtrls;
- type
- TForm1 = class(TForm)
- TreeView1: TTreeView;
- Button1: TButton;
- procedure Button1Click(Sender: TObject);
- private
- { Private declarations }
- procedure SetComCtlStyle(Ctl: TWinControl; Value: Integer; UseStyle: Boolean);
- public
- { Public declarations }
- end;
- const
- TVS_CHECKBOXES=$0100;
- var
- Form1: TForm1;
- implementation
- {$R *.dfm}
- procedure TForm1.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;
- procedure TForm1.Button1Click(Sender: TObject);
- begin
- SetComCtlStyle(TreeView1,TVS_CHECKBOXES,True);
- end;
- end.
在VB6.0中怎样给treeview添加背景图片
用word文档,怎样添加一个复选框??谢
如何添加C#中的TreeView控件。
请问为什么我的添加删除程序窗口上面没有“显示更新”的复选框
复选框是否选中
如何清除复选框?
什么是复选框
php复选框
JSP复选框问题??
ASP复选框使用
复选框是什么 怎么回事
用键盘如何完成复选框的复选?
怎么用键盘取消复选框
vb动态生成复选框的问题
文件夹属性里没有存储复选框?
如果设计复选框不可用?
ASP用复选框删除的问题!
asp中复选框的问题
js判断复选框是否被选中?
复选框里的值怎么接?
asp中,如何使用复选框
excel 中如何插入复选框
VB中如何使用复选框
asp.net 复选框值的问题