Exforsys

Free Training

Controls and Event Handlers

This is a discussion on Controls and Event Handlers within the Microsoft .NET forums, part of the Programming Talk category; I know that in an even I use the Handles control.click (for example) and then when the user clicks on ...

Go Back   Exforsys > Programming Talk > Microsoft .NET

Exforsys.com

  #1 (permalink)  
Old 05-13-2008, 11:56 AM
Software Engineer
 
Join Date: May 2008
Location: Illinois
Posts: 1
dpatfield66 is on a distinguished road
Send a message via MSN to dpatfield66
Controls and Event Handlers

I know that in an even I use the Handles control.click (for example) and then when the user clicks on the control, the code executes.

But what if I have 50 comboboxes that I want to execute code on when the uses clicks them? Rather than add every single combobox at the event handler, how could I effectively tell the program to execute this code during the click event for ALL comboboxes?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-18-2009, 06:43 AM
Junior Member
 
Join Date: Jan 2009
Posts: 1
Eyal.Albert is on a distinguished road
You have to register every control to that event.
The only short cut i can offer you is to run in a loop on every control on the form (and if you know that the controls are actually are placed in other controls like panel or tab control run recursively on every control that holds them) and register if the control is from the right type.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 11:26 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
Copyright 2004 - 2009 Exforsys Inc. All rights reserved.