拓 拓荒者 Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-04 #1 请问在使用Treeview的时候,如何触发各个标题的事件,而不影响它们前面的+号。 主要是如何触发各个主标题和各个节点下的标题事件,具体怎么写。
S savenight Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-04 #2 procedure TForm1.TreeView1Change(Sender: TObject; Node: TTreeNode); begin case node.Level of 1: node.Text :=node.Text +'1'; 2: node.Text :=node.Text +'2'; //... end; end;
procedure TForm1.TreeView1Change(Sender: TObject; Node: TTreeNode); begin case node.Level of 1: node.Text :=node.Text +'1'; 2: node.Text :=node.Text +'2'; //... end; end;
L linsb Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-04 #3 procedure TForm1.TreeView1Change(Sender: TObject; Node: TTreeNode); begin Datasource1.Enabled := Node.Data <> nil; if DataSource1.Enabled then Table1.GotoBookmark(node.Data); end;
procedure TForm1.TreeView1Change(Sender: TObject; Node: TTreeNode); begin Datasource1.Enabled := Node.Data <> nil; if DataSource1.Enabled then Table1.GotoBookmark(node.Data); end;
一 一成 Unregistered / Unconfirmed GUEST, unregistred user! 2002-05-04 #4 procedure TForm1.TreeView1Change(Sender: TObject; Node: TTreeNode); begin showmessage(treeview1.Selected.Text); end;
procedure TForm1.TreeView1Change(Sender: TObject; Node: TTreeNode); begin showmessage(treeview1.Selected.Text); end;