GotFocus for all contained controls

rbulph

Junior Contributor
Joined
Feb 17, 2003
Messages
397
Is there a simple way to detect when a control or any of its contained controls gets focus? I could loop through all of the parent control's contained controls and add a handler for the getfocus event of each of them and also for the parent control, but I would have imagined that there might be an easier way. Some sort of FocusPreview property of the parent control? I can't see anything.
 
Ah, the Enter event. Does the trick for user controls and panels, but for some reason the picture box doesn't have this event. No problem, I really want it for a user control.
 
Back
Top