I am developing a form which uses a TabControl. I want
the code to be able to detect which TabPage is currently
active. The documentation indicates that the
TabPageCollection should have an "Item" property which I
think may be the way to do this, but the "Item" property
doesn't show up on this object in intellisense, and it
gives me an error on compile. The error is:
"System.Windows.Forms.TabControl.TabPageCollection' does
not contain a definition for 'Item'"

Any ideas?

Re: TabControl.TabPageCollection property "Item" missing by Craig

Craig
Wed Jul 30 20:33:28 CDT 2003

Check out the TabControl.SelectedTab property....if you have the local
variable for each page defined then

If tacMyTabControl.SelectedTab is tpgPageOne Then
'//do page one handling
ElseIf tacMyTabControlSelectedTab is tpgPageTwo Then
'//do page two handling
End If

and so on....


--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET


"Joseph Crum" <jrcrum01@hotmail.com> wrote in message
news:01d901c356cf$278a9b40$a501280a@phx.gbl...
> I am developing a form which uses a TabControl. I want
> the code to be able to detect which TabPage is currently
> active. The documentation indicates that the
> TabPageCollection should have an "Item" property which I
> think may be the way to do this, but the "Item" property
> doesn't show up on this object in intellisense, and it
> gives me an error on compile. The error is:
> "System.Windows.Forms.TabControl.TabPageCollection' does
> not contain a definition for 'Item'"
>
> Any ideas?



Re: TabControl.TabPageCollection property "Item" missing by Claes

Claes
Thu Jul 31 03:29:46 CDT 2003

Something is wrong with your system
TabPageCollection.Item does indeed exist and it works just fine

/claes


"Joseph Crum" <jrcrum01@hotmail.com> wrote in message
news:01d901c356cf$278a9b40$a501280a@phx.gbl...
> I am developing a form which uses a TabControl. I want
> the code to be able to detect which TabPage is currently
> active. The documentation indicates that the
> TabPageCollection should have an "Item" property which I
> think may be the way to do this, but the "Item" property
> doesn't show up on this object in intellisense, and it
> gives me an error on compile. The error is:
> "System.Windows.Forms.TabControl.TabPageCollection' does
> not contain a definition for 'Item'"
>
> Any ideas?