UserControl delegating events

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • qreg
    New Member
    • Apr 2009
    • 1

    UserControl delegating events

    I've got a problem with usercontrols and delegating events from the controls that are inside such a usercontrol control.

    First for a brief description of the problem. I have a user control containing a label and a textbox. I need to linkt the event like click(), mousemove, mousedown etc. in such a manner that clicking the control inside the user control (i.e. label) would result in fireing the event for the usercontrol.

    This would not be a problem typically as I could simply link the event and label.click would launch usercontrol.cli ck... however the program I'm working on is an IDE and I create controls in runtime, and different behavior based on certain parameteres is required. Therefore the best way would be linking the events of the controls inside the user control events, and later only assinging events like usercontrol.cli ck += new....

    Hope I made it clear and you will be able to help me or at least give me some pointers where to look for answers.

    Regards
    Qreg
Working...