C
CGatto
Hi,
I have Windows Form with several User Controls embedded within. Only one
user control is visible at any one time. The user moves through the various
user controls by clicking Previous and Next buttons. What I want to happen
is for the individual user controls to have the ability to set focus to a
specific textbox control when the user control becomes active. Normally I
would handle this sort of thing via a form's activate event, but user
controls do not have this equivalent I've tried the GotFocus and Enter
events as well but neither fires independently simply when the user control
becomes the form's focus.
Right now I have the textbox focus working - but only through calling it via
the parent form (the parent form causes the user control to come to the
forefront, then sets the focus). But I'd rather have the logic self
contained within the user control. Is there some sort of Activate event
equivilent for user controls?
Thanks
I have Windows Form with several User Controls embedded within. Only one
user control is visible at any one time. The user moves through the various
user controls by clicking Previous and Next buttons. What I want to happen
is for the individual user controls to have the ability to set focus to a
specific textbox control when the user control becomes active. Normally I
would handle this sort of thing via a form's activate event, but user
controls do not have this equivalent I've tried the GotFocus and Enter
events as well but neither fires independently simply when the user control
becomes the form's focus.
Right now I have the textbox focus working - but only through calling it via
the parent form (the parent form causes the user control to come to the
forefront, then sets the focus). But I'd rather have the logic self
contained within the user control. Is there some sort of Activate event
equivilent for user controls?
Thanks