Registriert seit: 28. Mär 2006
Ort: 32816 Schieder-Schwalenberg
399 Beiträge
Delphi 10.4 Sydney
|
AW: TMS TAdvMainMenu
25. Mär 2014, 14:29
so nun hab ich es gelöst.
hier mal mein Code:
Delphi-Quellcode:
procedure TBenutzerverwaltungFrm.FormCreate(Sender: TObject);
var I, J : Integer;
tnNode: TTreeNode;
Node : TTreeNode;
begin
Node := AdvCheckTreeView1.Items.Add(nil, 'AlleRechte');
tnNode := Node;
if frmMain.Menue.Items.count > 0 then
begin
for I := 0 to frmMain.Menue.Items.Count - 1 do
begin
If I = 0 then
Node := AdvCheckTreeView1.Items.AddChild(Node, copy(frmMain.Menue.Items[I].Caption,2,35))
else
Node := AdvCheckTreeView1.Items.AddChild(tnNode, copy(frmMain.Menue.Items[I].Caption,2,35));
if frmMain.Menue.Items[I].count > 0 then
for J := 0 to frmMain.Menue.Items[I].Count - 1 do
begin
If J = 0 then
Node := AdvCheckTreeView1.Items.AddChild(Node, frmMain.Menue.Items[I].Items[J].Caption)
else
Node := AdvCheckTreeView1.Items.Add(Node, frmMain.Menue.Items[I].Items[J].Caption)
end;
end;
end;
end;
Danke an alle.
Walter Landwehr Mfg
Walter
|
|
Zitat
|