Help with TabControl

M

Mike Fellows

I have a TabControl (TabControl1) containing 3 TabPage's (TabPage1, TabPage2
and TabPage3)

under certain circumstances i need to make some of these tab pages invisible

ive tried
me.tabpage1.visible = false

but nothing happens and the tab pages is still visible

when i set the whole of the TabControl.Visible = False the whole of the tab
control dissapears as it should

how do i set a tabpage to be invisible i would have thought the above would
have worked but it didnt

Thanks

Mike Fellows
 
O

One Handed Man

the visible property will return true or false depending if the tabPage has
been selected and is showing.

There is a hide method, but that does not seem to work. I think adding and
removing tabs is a bit drastic though.

;-D


--
Regards - One Handed Man

Author : Fish .NET & Keep .NET
=========================================
This posting is provided "AS IS" with no warranties,
and confers no rights.
 
H

Herfried K. Wagner [MVP]

Hello,

Mike Fellows said:
I have a TabControl (TabControl1) containing 3 TabPage's
(TabPage1, TabPage2
and TabPage3)

under certain circumstances i need to make some of these tab pages invisible

ive tried
me.tabpage1.visible = false

but nothing happens and the tab pages is still visible

The 'Visible' property is not implemented for the 'TabPage'. You may want
to use the TabControl provided with the Magic Library:

http://www.dotnetmagic.com/

HTH,
Herfried K. Wagner
 
H

Herfried K. Wagner [MVP]

Hello,

One Handed Man said:
the visible property will return true or false depending if the
tabPage has been selected and is showing.

There is a hide method, but that does not seem to work.
I think adding and removing tabs is a bit drastic though.

ACK. But there is no other way for the Windows Forms TabControl.

Regards,
Herfried K. Wagner
 
O

One Handed Man

i suppose subclassing it would be the answer for ease of management.


--
Regards - One Handed Man

Author : Fish .NET & Keep .NET
=========================================
This posting is provided "AS IS" with no warranties,
and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top