Autor Beitrag
hassedelphi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 101

WIN XP
D7 Enterprise
BeitragVerfasst: Mo 04.08.03 11:38 
kann mir jemand sagen, wie ich ein object während der Lauzeit kreiere?
ich hab mir das eigentlich so vorgestellt:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure Button1click(sender:tobject);
 VAR x : Tlabel;
begin
 application.create(x);
end;


dass klappt aber leider nicht.
Aya
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1964
Erhaltene Danke: 15

MacOSX 10.6.7
Xcode / C++
BeitragVerfasst: Mo 04.08.03 11:46 
Hi,

so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
var
  L: TLabel;
begin
  L:=TLabel.Create(self);
  L.Parent:=self;
end;


Au'revoir,
Aya~

_________________
Aya
I aim for my endless dreams and I know they will come true!
hassedelphi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 101

WIN XP
D7 Enterprise
BeitragVerfasst: Mo 04.08.03 12:05 
:D thx
hassedelphi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 101

WIN XP
D7 Enterprise
BeitragVerfasst: Di 05.08.03 11:08 
bitte hilf nochmal. dein quellcode funktiert bei mir im tform1.formcreat aber nicht bei nem Buttonclick
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.Button1Click(Sender: TObject);
VAR x : Tedit;
begin
x:=Tedit.create(self);
x.Parent:=self;
x.SetBounds(50,50,150,0);
x.show;x.Focused;
end;

was ist falsch?
Adrian
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 314



BeitragVerfasst: Di 05.08.03 11:20 
Servus!

Mit der Suchfunktion und den Begriffen "Laufzeit" und "OnClick" findest Du eine ganze Menge Infos mit Beispielen.
Viel Spaß beim Stöbern und Ausprobieren.

Gruß,

Adrian
hassedelphi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 101

WIN XP
D7 Enterprise
BeitragVerfasst: Di 05.08.03 11:30 
wo muss ich suchen. delphi hilfe, forum... :lol:

_________________
you're not be able to help, that you're an human
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Di 05.08.03 11:34 
hassedelphi hat folgendes geschrieben:
was ist falsch?

Der Code ist schon richtig. Nur hast du in einer Zeile einen nicht wirklich sinnvollen Wert angegeben:
ausblenden Delphi-Quelltext
1:
x.SetBounds(50,50,150,0);					

Kontrolliere mal den Wert für die Höhe des neuen Editfeld.

Gruß
Tino
hassedelphi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 101

WIN XP
D7 Enterprise
BeitragVerfasst: Di 05.08.03 11:59 
boa cool!!!
danke man :D :D :D

_________________
you're not be able to help, that you're an human