Autor Beitrag
Janoschka
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 23



BeitragVerfasst: So 22.12.02 15:30 
Ich erzeuge in meinem Programm MDI - Child Fenster.
halt immer mit TWinxyz.Create([Owner]); (<- is TWinxyz jetzt ne Klasse, oder wie - sorry hab da nicht viel plan von *g*)
Ich möchte jetzt bei allen Childs die Farbe eines Darauf befindlichen memos ändern - bei allen, kann ich das irgendwie ganz einfach machen?
AndyB
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1173
Erhaltene Danke: 14


RAD Studio XE2
BeitragVerfasst: So 22.12.02 19:30 
Du kannst mit den Eigenschaften der MDIForm (also nicht MDI-Client) MDIChildCount und MDIChildren[] auf die Childs zugreifen:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TForm1.Button1Click(Sender: TObject)
var i: Integer;
begin
  for i := 0 to MDIChildCount - 1 do
    if MDIChildren[i] is TWinxyz then
      TWinxyz(MDIChildren[i]).Memo1.Color := clRed;
end;

_________________
Ist Zeit wirklich Geld?