Home
Top.Mail.Ru Yandeks.Metrika
Forum: "Main";
Current archive: 2003.05.01;
Download: [xml.tar.bz2];

Down

event handling components created in real time Find similar branches


Airdriver   (2003-04-21 11:56) [0]

Please tell me how to handle the events of the components created in Real time.
For example, the button was created
procedure TForm1.Button1Click (Sender: TObject);
var MyButton: TButton; // declare a variable of type TEdit
begin
MyButton: = TButton.create (self); // create an instance of the component
MyButton.parent: = form1; // the text field will appear on the form
MyButton.left: = 10;
MyButton.top:=10;
MyButton.Width: = 250;
MyButton.Text: = "Hello component appeared by myself !!!";
end;

now I need a click handler to sell this button, something like
procedure TForm1.MyButtonClick (Sender: TObject);

Please tell everyone who knows !!!!!



Плохиш   (2003-04-21 12:00) [1]

Help - TButton - OnClick



Наталия   (2003-04-21 12:03) [2]

On delphi.vitpc.com see the article "Life and death in run-time mode".



Digitman   (2003-04-21 12:08) [3]


> now I need a click handler to click this button,
> something like
> procedure TForm1.MyButtonClick (Sender: TObject);


declare and implement this method in your form class

then you can use it as an event handler:

MyButton.OnClick: = MyButtonClick;

ps

Only not in "real time", but in "runtime".
Different in essence concepts.



Airdriver   (2003-04-21 12:15) [4]

Thank!!!!!!!!!



Pages: 1 whole branch

Forum: "Main";
Current archive: 2003.05.01;
Download: [xml.tar.bz2];

Top









Memory: 0.56 MB
Time: 0.021 c
We answer immediately.
Calm
2003-04-14 12:29
2003.05.01
IB + ASP, how to create a web-interface for a report?


We answer immediately.
Pubert
2003-04-14 11:27
2003.05.01
How to programmatically call the properties window for ConnectionString (ADO)


We answer immediately.
Tango
2003-04-11 06:29
2003.05.01
Tormented trouble with locate


We answer immediately.
reticon
2003-04-14 12:21
2003.05.01
delete dbase table entry


We answer immediately.
Bjvalentine
2003-03-13 16:22
2003.05.01
Sound card





afrikaans albanian Arabic armenian azerbaijani basque belarusian bulgarian catalan Chinese (Simplified) Chinese (Traditional) croatian Czech danish Dutch English estonian filipino finnish French
galician georgian German greek haitian Creole hebrew Hindi hungarian icelandic indonesian Irish italian japanese Korean latvian lithuanian macedonian malay maltese norwegian
persian polish portuguese Romanian russian serbian slovak Slovenian Español swahili Swedish thai turkish Ukrainian urdu vietnamese welsh yiddish bengali bosnian
cebuano Esperanto gujarati hausa hmong igbo javanese kannada khmer lao latin maori marathi mongolian nepali punjabi somali tamil telugu yoruba
zulu
English French German Italian Portuguese Russian Spanish