By Marcia G Akins - 11/2/2011
Hi all.
I have a winform with a primary BO and a TabControl that houses 2 Child BOs (They are logical children but not set up as Child BOs in the property sheet. I am handling the relationships in code).
Anyway, here is the goofy thing. I want the user to be able to edit the child BOs whenever they click on the edit button in the form's toolbar. The very first time the user clicks the edit button, everything happens as it should except that the child BO on the 2nd page of the TabControl does not get put into edit mode. If the user then click the Undo button in the toolbar and tries to edit after that, everything works - including the controls on the second page.
Any ideas? I am getting tired of flinging code at this
TIA
Marcia
|
By Marcia G Akins - 11/2/2011
Well, here I am talking to myself again
For anyone else who runs into this, I found the answer at http://stackoverflow.com/questions/2678184/c-sharp-winforms-tabcontrol-elements-reading-as-empty-until-tabpage-selected.
So I just added this code in the form's Shown event handler and the problem went away:
foreach (TabPage tp in tcProjectDetails.TabPages)
{
tp.Show();
tcProjectDetails.TabPages[0].Show();
}
|
|