In my application I need to generate a number of components (of the same kind) on the fly. I ran into difficulties how to handle the events, triggered by them as I have to know where it comes from. Browsing the docs, faq's and forums did not give me an idea, how can I detect which of the components triggered the event?
So for example: I create 2 TButton components on-the-fly (Btn1, Btn2). In both I declare OnClick:=HandleTheclicks;
Now procedure HandleTheClicks(Sender:TObject) works OK, except that I need to find out which button fired the event.
An example or a pointer to an explanation is welcome.
Regards, Vladimir
So for example: I create 2 TButton components on-the-fly (Btn1, Btn2). In both I declare OnClick:=HandleTheclicks;
Now procedure HandleTheClicks(Sender:TObject) works OK, except that I need to find out which button fired the event.
An example or a pointer to an explanation is welcome.
Regards, Vladimir