Autor Beitrag
joschi
Hält's aus hier
Beiträge: 5



BeitragVerfasst: Mo 22.11.04 14:16 
Hi!

Also mit der Erstellung der Form hab ich keine Probleme, aber wie kann ich dann in diese Form eine andere Komponente wie "TMemo" einbinden?

Also so siehts bis jetzt aus:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
procedure TInternet.About1Click(Sender: TObject);
var
  hilfe : TForm;
  text : TMemo;
begin
  hilfe := TForm.Create(Self);
  hilfe.Show;
  hilfe.Caption := ('Hilfe');
  text := TMemo.Create(self);
  text.show;
  text.lines.add('Hilfe....');
end;


natürlich kann er jetzt "text" nirgendswo anzeigen.

Kann mit da jemand weiterhelfen? und ich möchte nicht eine externe Datei einbinden..

THX schonmal im Vorraus :)
herzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 168

WINXP pro, SUSE Linux 9.0
D7 Pers.
BeitragVerfasst: Mo 22.11.04 18:23 
Nur Forms kann man mit Show anzeigen lassen, bei Objekten parent zuweisen und ggf. visible true setzen!

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
procedure TInternet.About1Click(Sender: TObject);
var
  hilfe : TForm;
  text : TMemo;
begin
  hilfe := TForm.Create(self);
  hilfe.Caption := ('Hilfe');
  text := TMemo.Create(Hilfe);
  text.Parent:=Hilfe;
  text.Left:=10;
  text.Top:=10;
  text.Width:=100;
  text.Height:=100;
  hilfe.Show;
end;