-
January 29th, 2011, 08:57 PM
#1
How does WinForms label control handle focus? (a newbie question, perhaps)
Folks,
There is a panel which contains 2 components: a label and a TreeView. The hierarchy, obviously, looks like this:
Code:
panel1 // handles Enter event
- label1
- treeView1
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?
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!
- Nick
Tags for this Thread
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
|