Ed -
Not sure if it matters, when it comes to the basic question, but here
goes...
My intention is to utilize the Tab Pages similar to a Panel, but Tab
Pages does some nice design time layout. To completely suppress the tab
pages that are not current, and prevent them from being user selected, I
take them out of the on-screen tab-control and move them into a hidden,
manually created tab-control. Keeping hidden tab pages in a hidden tab
control is necessary to allow the form to close correctly.
I boiled this snippet to the most essential parts of my manual switch.
Private Sub GoToTabPage( ByRef NewTabPage as TabPage )
Do While TabControl1.TabPages.Count > 0
' I would like to raise an event,
' TabControl1.TabPages(0).Validating here
' and I would suppress the following line if
' feedback says to Cancel (as well as going
' to the new tab of course)
HiddenTC.TabPages.Add(TabControl1.TabPages(0))
Loop
TabControl1.TabPages.Add( NewTabPage )
' I would like to raise a NewTabPage.Enter event here
End Sub
I think regardless of the approach above, the mechanics of how to invoke
any event on a particular type of control instance is a much more
generic question.
- Lee
> How are you manually switching tabs? Can you provide the code snippet?
>
[quoted text clipped - 11 lines]
>>
>>- Lee
Lee Gillie - 18 Dec 2004 02:18 GMT
Ed, are you there?
I gave you my code, do you have any ideas?