>>protected virtual void GotFocusHandler(object sender, EventArgs e) >>{ >> this.TabPages[this.SelectedIndex].Focus(); >>} >>>>
>>protected virtual void GotFocusHandler(object sender, EventArgs e) >>{ >> if (this.Controls.Count > 0) >> { >> Control o = this.GetNextControl(this, true); >> while (o.Controls.Count > 0) >> { >> o = o.GetNextControl(o, true); >> } >> o.Focus(); >> } >>} >>>>
>>>// Set the tag of the page to the enum >>>oNewPage.Tag = csApplication.Panes.ship_items; >>> >>>// Create the usercontrol and call the setup method on it >>>crlShipItems oShipItems = new crlShipItems(); >>>oShipItems.Setup(); >>> >>>// Add the user control to the tab >>>tabPages.TabPages[iPage].Controls.Add(oShipItems); >>>oShipItems.Dock = DockStyle.Fill; >>> >>>// Set the focus on the control >>>oShipItems.Select(); >>>>>>
>>>private void crlShipItems_Enter(object sender, EventArgs e) >>>{ >>> txtPartNo.Focus(); >>>} >>>>>>