Autor Beitrag
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 28

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Mo 13.06.05 16:37 
ich hab zwar schon einiges probiert, bekomms aber net hin, meine neueste kreation sieht so aus:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
var
  shape: Tshape
begin
  shape := findcomponent('MainForm.SStatus' + inttostr(dlg_ToDoSender));
  case shape.Brush.color;
    clgreen: showmessage('Grün');
    clyellow: showmessage('Gelb');
    clred: showmessage('Rot');
  end;  
end;

zuerst hatte ich MainForm.FindComponent('...'); und dann ohne die variable, aber das funzte auch net :?

so gehts:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TToDoInput.FormShow(Sender: TObject);
begin
  case TShape(findcomponent('SStatus' + inttostr(dlg_ToDoSender))).Brush.color of
    clgreen: showmessage('Grün');
    clyellow: showmessage('Gelb');
    clred: showmessage('Rot');
  end;
end;

aber immer noch net global :(

so aber schon:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TToDoInput.FormShow(Sender: TObject);  
begin  
  case TShape(MainForm.findcomponent('SStatus' + inttostr(dlg_ToDoSender))).Brush.color of  
    clgreen: showmessage('Grün');  
    clyellow: showmessage('Gelb');  
    clred: showmessage('Rot');  
  end;  
end;