|
-
Dec 20th, 2007, 02:43 PM
#1
Thread Starter
Addicted Member
[RESOLVED] [2005] Events of "in runtime declared" Controls
Hi;
my application creates controls in runtime. It takes information from DB and with this information it creates x number of controls. All of these controls are the same. (lets say all of them are buttons). So I dont put any button on the form. The problem is that these buttons will do different things if they are being clicked. They need the infrmation, which is being saved in the text of buttons, and with this information they will do different things. The problem is that I cant define the evetn handler of a control which is being declared in the runtime. How can I do that?
Thanks for every kind of help!
(pls say if this message is not understandable)
-
Dec 20th, 2007, 02:54 PM
#2
Re: [2005] Events of "in runtime declared" Controls
Just use the AddHandler:
Code:
dim btnNew as Button
...
AddHandler btnNew.Click, AddressOf <function_name>
That should do it
-
Dec 20th, 2007, 03:02 PM
#3
Thread Starter
Addicted Member
Re: [2005] Events of "in runtime declared" Controls
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|