Autor Beitrag
breakdancer1111
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 148

Windows 7 Home Premium 64Bit
Delphi XE2 Starter
BeitragVerfasst: Sa 20.03.04 12:36 
Hallo,

bei einem Buttonklick lasse ich eine MdiChild erstellen nun möchte ich das auf dieser ein Image
angezeigt wird. Wie soll ich das nun machen?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
// Bei buttonklick in Form 1 (MdiForm)
var Form: TForm;
      i: integer;
begin
  Form := TForm.Create(Self);
  with Form do begin
    Name := 'Bild' + IntToStr(i);
    Caption := Name;
    FormStyle := fsMdiChild;
    Width := 100;
    Height := 100;
    Left := 0;
    Top := 0;
  end;
end;


Das TImage soll auch dierekt bei dem Button klick erstellt werden.

Moderiert von user profile iconTino: Topic verschoben.
Michael Stenzel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 133


D3 Prof, D7 PE
BeitragVerfasst: So 21.03.04 00:45 
Hi breakdancer1111.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
// Bei buttonklick in Form 1 (MdiForm) 
var Form: TForm;
      Image : TImage;
      i: integer; 
begin 
  Form := TForm.Create(Self); 
  with Form do begin 
    Name := 'Bild' + IntToStr(i); 
    Caption := Name; 
    FormStyle := fsMdiChild; 
    Width := 100; 
    Height := 100; 
    Left := 0; 
    Top := 0; 
  end;
  Image := TImage.Create(Form);
  with Image do begin
    Parent := Form1;
    Width := 100; // oder was du Brauchst
    Height := 100;
    ....
    Show;
  end;
end;


mfg
Michael