471,331 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,331 software developers and data experts.

Event handling

I have code that dynamically creates checkboxes at runtime. How can I
capture events from those checkboxes?

Thanks

Jul 22 '05 #1
2 1053
Hi man,
when in your code at rine-time initialize the checkBox initialize the even
as well!! and add the box1 in an ArrayList
CheckBox box1 = new CheckBox();

box1.CheckedChanged +=new EventHandler(box1_CheckedChanged);

CheckBoxArray.Add (box1)

also, make the box1_CheckedChanged (object Sender, System.EventArgs e)

in this method cast the sender and find the checkBox in the arrayList and
what must be done

Hope that Helps

"kdbarrett" <kd*******@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
I have code that dynamically creates checkboxes at runtime. How can I
capture events from those checkboxes?

Thanks

Jul 22 '05 #2
I can't seem to get this to work. Can you point me to a more detailed
example? Thanks!

Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Pavils Jurjans | last post: by
4 posts views Thread by Eric | last post: by
18 posts views Thread by Christopher W. Douglas | last post: by
8 posts views Thread by Mark | last post: by
4 posts views Thread by hillcountry74 | last post: by
2 posts views Thread by Paul E. Orman | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.