Fórum Add Subitem TreeView1 Estilo ListView1 ? #369449
28/03/2009
0
Abraços...
Warfighter
Curtir tópico
+ 0Posts
02/04/2009
Warfighter
Gostei + 0
03/04/2009
Woinch
ListItem := ListView1.Items.Add; ListItem.Caption := ´TEXTO´; ListItem.SubItems.Add(´SUBITEM´); ListItem.SubItems.Add(´SUBITEM´);
Gostei + 0
03/04/2009
Warfighter
como fazer isso ?
é estilo o treeview :shock:
Gostei + 0
06/04/2009
Woinch
Veja o exemplo retirado do help do delphi:
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´);
{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;Acho que é isso que você quer né? Qualquer dúvida é só responder.
Obrigado.
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)