Custom user control and focus problem.

  • Thread starter Thread starter Jerod
  • Start date Start date
J

Jerod

Hi all,

My situation is a bit more complex then my example here, but if I can
figure this out then the rest should fall into place. Thanks in
advance!

Example:
MyUserControl contains a textbox.
MyForm contains MyUserControl and a Label.

When the user navigates to the textbox I want to change the label's
text. The problem is that the textbox gets focus, the UserContol does
not get focus. I can't trap the textbox focus because is private to
the UserControl.

Does anybody know a way to capture the MyUserControls_GotFocus event?

Thanks again!
Jerod
 
Instead of the userControl1.GotFocus, try using the userControl1.Enter
event.

===================
Clay Burch
Syncfusion, Inc.
 
Jerod,

Can't you catch the focus event of the text box inside that user control and
then have the user control to fire a special even (one that you define).
This way the form can hook on this event and change the text of the label
acrodingly
 
Back
Top