Autor Beitrag
Girgl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 281


D6 Enterprise
BeitragVerfasst: Fr 30.04.04 12:47 
Servus,wie greif ich auf ereignisse einer zur laufzeit erstellten komponente zu?
JoelH
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 806
Erhaltene Danke: 17

Win10
Delphi Alexandria 11.2 Patch 1
BeitragVerfasst: Fr 30.04.04 13:01 
Titel: hmm,
du musst einfach die Eregnisse belegen mit Aktionen/Funktionen.

_________________
mfg. Joel
Girgl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 281


D6 Enterprise
BeitragVerfasst: Fr 30.04.04 13:13 
ja und genau des will ich ja wissen wies geht.Ich erstell ja die memo dynamisch,wie kann ich dann auf die ereignisse was bestimmtes auslösen lassen?
JoelH
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 806
Erhaltene Danke: 17

Win10
Delphi Alexandria 11.2 Patch 1
BeitragVerfasst: Fr 30.04.04 13:47 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
var komponente : TLabeledEdit;
begin
komponente := TLabeledEdit.Create(self);
komponenten.OnDblClick := test;
end;


ausblenden Delphi-Quelltext
1:
2:
3:
procedure Tfrm_mdi_layouteditor.test(Sender: TObject);
begin
end;


wichtig ist einfach nur dass die aufgerufene Procedure die richtigen Parameter hat.

Du kannst es dir aber auch einfacher machen, leg einfach ein DUMMY auf die Form und mach es unsichtbar, die Events belegtst du aber und wenn du eine neue Komponente erzeugst belegst du die Events mit der des Dummys , dann haste immer die richigen Parameter zur hand.

_________________
mfg. Joel
Girgl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 281


D6 Enterprise
BeitragVerfasst: Fr 30.04.04 14:12 
ok,danke erstmal,aber:kann ich snet irgendwie machen,dass es irgendwie wie ne if-abfrage is?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
Komponente.OnChange do
 begin
  Test:=Irgendwas;
  ...
 end;
JoelH
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 806
Erhaltene Danke: 17

Win10
Delphi Alexandria 11.2 Patch 1
BeitragVerfasst: Fr 30.04.04 14:21 
Titel: hmm,
in die procedure kannste doch reinlegen was du willst.

_________________
mfg. Joel
Girgl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 281


D6 Enterprise
BeitragVerfasst: Fr 30.04.04 14:22 
ja klar,wollte nur wissen,obs auch ne alternative gibt
Girgl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 281


D6 Enterprise
BeitragVerfasst: Mi 12.05.04 13:44 
hab leider ein problem und zwar bekomm ich andauernd die Fehlermeldung unsatisfied forward.
Ich will die prozedur am ende des public und private teils deklarieren,aber da gehts net und auch so gehts irgendwie net.

Es muss ja so ungefähr aussehen
ausblenden Delphi-Quelltext
1:
procedure test(Sender:TObject);					


und dann im implementationsteil kommt das ganze zeug in die procedure.

Kann jemand bitte nen code geben dazu
orakel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 92

Win XP

BeitragVerfasst: Mi 12.05.04 14:12 
Hier der Code..

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
type
  TForm1 = class(TForm)
  procedure test(Sender:TObject);
  private
  //procedure test(Sender:TObject)
  public
  // procedure test(Sender:TObject);
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}
procedure TForm1.test(Sender:TObject);
begin
 {...}
end;

end.

_________________
Nicht verzagen, orakel fragen!
Girgl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 281


D6 Enterprise
BeitragVerfasst: Mi 12.05.04 14:32 
hat sich erledigt