怎么使用TREEVIEW控件最好有例子加注释谢谢
解决方案 »
- 北京转让Delphi图书
- 在线诚等,求一问题的解决方法!
- ado连access数据库,access数据库放于光盘上,如果在win2000系统下,一切正常,
- 设置了datamodule1后,像执行一个语句,将另外一个表中的数据插入到当前表中,如何操作?
- decodedate,和encodedate有什么用?
- delphi2010,MainMenu Autohotkey设为 maManual还是不行,怎么弄呀?
- 免费软件OpenOffice挑战微软(可以打开Word文档或保存为Word文档)
- 连接Sybase的Adaptive Server IQ数据库???
- 我终于做出来了。这段程序使用了shell_notifyicon的新特性,可以在TrayIcon上显示出Balloon Tips。(需IE5或以上支持)
- 大家帮忙提个醒,这个第三方控件来叫什么来的?
- 用DELPHI如何发送按键给其他程序?
- 动态报表的问题!
var
MyTreeNode1, MyTreeNode2: TTreeNode;
begin
with TreeView1.Items do
begin
Clear; { remove any existing nodes }
MyTreeNode1 := Add(nil, 'RootTreeNode1'); { Add a root node }
{ Add a child node to the node just added }
AddChild(MyTreeNode1,'ChildNode1');
AddChild(MyTreeNode1,'ChildNode1') ; {Add another root node}
MyTreeNode2 := Add(MyTreeNode1, 'RootTreeNode2');
{Give MyTreeNode2 to a child }
AddChild(MyTreeNode2,'ChildNode2'); {Change MyTreeNode2 to ChildNode2 }
{ and add a child node to it}
MyTreeNode2 := TreeView1.Items[3];
AddChild(MyTreeNode2,'ChildNode2a'); {Add another child to ChildNode2, after ChildNode2a }
Add(MyTreeNode2,'ChildNode2b'); {add another root node}
Add(MyTreeNode1, 'RootTreeNode3');
end;end;procedure TForm1.Button2Click(Sender: TObject);
begin
TreeView1.SaveToFile('d:\wudi.txt');
end;