rustyd Posted March 21, 2005 Posted March 21, 2005 When I change the selectedindex of the tabcontrol, the first textbox in the tabpage container receives OnEnter before the SelectedIndexChanged event fires. What is the event order for the tabcontrol? what ends up happening is OnEnter of the textbox I'm validating the previous textbox (from the previous tabpage) which fails, so I set the SelectedIndex back to the previous tabpage index. This results in tabpage being hidden. If I set the SelectedTab = TabPage1 then I the correct page is visible, the correct textbox has focus, but the tab at the top is still showing tabpage2 as selected eventhough it is showing the first page. Any suggestions. Quote rustyd
rustyd Posted March 23, 2005 Author Posted March 23, 2005 Resolved situation by validating before setting TabControl1.SelectedIndex. Quote rustyd
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.