Board index » cppbuilder » Events for run time created components

Events for run time created components

Hello,
I am making a number of TImage components at run time.
I am wishing to allow the OnMouseDown, OnMouseMove events
to work but I don't know how to do this for components created
at run time.
Advice on this would be appreciated please.

johnj

 

Re:Events for run time created components


http://www.bcbdev.com/faqs/faq1.htm

Quote
"jon" <fr...@labyrinth.NOnet.SPAMau> wrote in message

news:3d8434d2@newsgroups.borland.com...
Quote
> Hello,
> I am making a number of TImage components at run time.
> I am wishing to allow the OnMouseDown, OnMouseMove events
> to work but I don't know how to do this for components created
> at run time.
> Advice on this would be appreciated please.

> johnj

Re:Events for run time created components


Use event handlers assignment lines:

        Image1->OnMouseDown = Image1MouseDown;
        Image1->OnMouseMove = Image1MouseMove;

where:
Image1MouseDown is the event handler for the OnMouseDown event, and
Image1MouseMove is the event handler for the OnMouseMove event.

Rodolfo

Quote
"jon" <fr...@labyrinth.NOnet.SPAMau> wrote in message

news:3d8434d2@newsgroups.borland.com...
Quote
> Hello,
> I am making a number of TImage components at run time.
> I am wishing to allow the OnMouseDown, OnMouseMove events
> to work but I don't know how to do this for components created
> at run time.
> Advice on this would be appreciated please.

> johnj

Other Threads