Fórum treeview (urgente) #170217
18/07/2003
0
estou tentando fazer com que os (nó) do treeview quando selecionado mostre o tabcontrol
treeview tabcontrol
no1 tabcontrol1
no2 tabcontrol2
Entao quando o (no1) for selecionado exibir o tabcontrol1, quando o (no2) for selecionado exibir o tabcontrol2 e assim por diante
treeview tabcontrol
no1 tabcontrol1
no2 tabcontrol2
Entao quando o (no1) for selecionado exibir o tabcontrol1, quando o (no2) for selecionado exibir o tabcontrol2 e assim por diante
Edinydia
Curtir tópico
+ 0
Responder
Posts
21/07/2003
Allan
Não sei se entendi , mas vc pode fazer isso identificando o level (nível) do seu treeview , e fazer por exemplo no evento OnChanging do Treeview o seguinte :
procedure TForm1.TreeView1Changing(Sender: TObject; Node: TTreeNode;
var AllowChange: Boolean);
begin
if Node.Level = 0 then
PageControl1.ActivePageIndex := 0
else
if Node.Level = 1 then
PageControl1.ActivePageIndex := 1;
end;
procedure TForm1.TreeView1Changing(Sender: TObject; Node: TTreeNode;
var AllowChange: Boolean);
begin
if Node.Level = 0 then
PageControl1.ActivePageIndex := 0
else
if Node.Level = 1 then
PageControl1.ActivePageIndex := 1;
end;
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)