Assigning event

Please discuss general Delphi programming topics here.

Assigning event

Postby Hafren » September 9th, 2007, 6:36 pm

Hello,

How can I assign an onmousemove event to a number of buttons
created at runtime?

Thanks

Hafren[/b]
Hafren
Member
Member
 
Posts: 2
Joined: September 9th, 2007, 5:50 pm
Location: Wales

Postby Johnny_Bit » September 9th, 2007, 7:10 pm

when you crate then in create statement add something like
Code: Select all
thatdumbjutscreatedbutton.onmouseover:=form1.idontwanttosearchforanswer;

it's as simple as that. why you didn't even try?
Thou shalt write the code, not connect the bricks.
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am

Postby Hafren » September 10th, 2007, 8:15 am

I did try all the obvious things but they didn't work in the situation.
Thanks for your reasoned and courteous reply.

Hafren
Hafren
Member
Member
 
Posts: 2
Joined: September 9th, 2007, 5:50 pm
Location: Wales

Postby Johnny_Bit » September 11th, 2007, 6:32 am

and what exacly does not work?
Thou shalt write the code, not connect the bricks.
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am


Return to Delphi Programming

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron