I use an ErrorProvider on my form to show errors.
This works fine as long as I dont use a TabControl.
When using a TabControl an error can happen on a TabPage that doesnt have the focus.
So I bring the TabPage with the error to front using this code:
Unfortunately this code brings the TabPage to front but it doesnt show the TabPage as being selected.
Having TabPage1, TabPage2 and TabPage3 with TabPage3 selected before validation and the error happening on TabPage1 it will show TabPage1 and its controls but it still looks as if TabPage3 would be selected (heading "TabPage3" is in front).
Has anyone an idea to solve this problem?
Thanks in advance
Andy
This works fine as long as I dont use a TabControl.
When using a TabControl an error can happen on a TabPage that doesnt have the focus.
So I bring the TabPage with the error to front using this code:
Unfortunately this code brings the TabPage to front but it doesnt show the TabPage as being selected.
Code:
myTabPage.BringToFront()
myTabPage.Select()
myTabPage.Show()
myTabPage.Refresh()
Having TabPage1, TabPage2 and TabPage3 with TabPage3 selected before validation and the error happening on TabPage1 it will show TabPage1 and its controls but it still looks as if TabPage3 would be selected (heading "TabPage3" is in front).
Has anyone an idea to solve this problem?
Thanks in advance
Andy