January 29th, 2011, 07:57 PM
How does WinForms label control handle focus? (a newbie question, perhaps)
There is a panel which contains 2 components: a label and a TreeView. The hierarchy, obviously, looks like this:
I need to do some UI updates when user starts interacting with any of these 3 controls. My attempted strategy was to catch the Enter event of the panel, which would fire when user clicks a label, or TreeView. This way, I can write only one (1) event handler instead of several. While it worked for the TreeView, it didn't work for the label. When I click the label, I don't get the Enter event on the panel. What’s different about the label control?
panel1 // handles Enter event
I could handle the Click event of the label. At the same time, I wonder what the other solutions might be.
Any suggestion, insight or reference is really appreciated!
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!