Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi

 

i have a dinamic group of buttons but i want to centralize their

events in one event

 

eg i have

button1 -> clickevent

button2 -> clickevent

button3 -> clickevent

 

now i don't know the number of buttons at first so theyr dinamic

 

wath i want to do is get all these events in on

 

like

 

buttons_click ( sender, ...)

 

i gues i should use subbclassing but i never used it before

is there onyone who can help me or explane me what i

should do

 

 

:confused:

  • *Experts*
Posted

Create a handler that will accept the required arguments and use the AddHandler keyword to add an event handler for the object. To see which button raised the event use the sender object and cast it to a button.

'example
AddHandler object.event, AddressOf handlermethod
'do this for every button you add

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...