Board index » cppbuilder » Another question about dynamically creating TImage object

Another question about dynamically creating TImage object

Another question about dynamically creating TImage objects.  If I
programmatically/dynamically created a TImage object, how do I register an
OnClick event handler on the Form for that TImage object?  TIA..
 

Re:Another question about dynamically creating TImage object


void __fastcall TForm1::MyImageClick(TObject *Sender)
{
    // do something

Quote
}

TImage *img = new TImage(this);
img->OnClick = MyImageClick;

Gambit

"Robert H. Oujesky" <rouje...@mylinuxisp.com> wrote in message
news:3aa30305$1_2@dnews...

Quote
> Another question about dynamically creating TImage objects.  If I
> programmatically/dynamically created a TImage object, how do I register an
> OnClick event handler on the Form for that TImage object?  TIA..

Other Threads