Moin...
Ich mache das auch nicht anders...
Delphi-Quellcode:
Node := tvRights.GetFirst;
while Assigned(Node) do
begin
Data := tvRights.GetNodeData(Node);
State := TdUserRight(Data^.DataRight).AllowedState;
if State <> asNode then
begin
case aMode of
True:
Node.CheckType := ctCheckBox; // einblenden
False:
Node.CheckType := ctNone; // ausblenden
end;
case State of
asAllowed:
Node.CheckState := csCheckedNormal;
asNotAllowed:
Node.CheckState := csUncheckedNormal;
end;
end;
Node := tvRights.GetNext(Node);
end;
tvRights.Repaint;