Hallo,
gibt es eine Art Basisklasse, damit ich nicht jedes Element extra ansprechen muss?
Delphi-Quellcode:
// TGroupBox
if Form.FindComponent(Node.Attributes['Name']) is TGroupBox then
begin
(Form.FindComponent(Node.Attributes['Name']) as TGroupBox).Caption:=Node.Attributes['Caption'];
end;
// TLabel
if Form.FindComponent(Node.Attributes['Name']) is TLabel then
begin
(Form.FindComponent(Node.Attributes['Name']) as TLabel).Caption:=Node.Attributes['Caption'];
end;
// TBitBtn
if Form.FindComponent(Node.Attributes['Name']) is TBitBtn then
begin
(Form.FindComponent(Node.Attributes['Name']) as TBitBtn).Caption:=Node.Attributes['Caption'];
end;