473,386 Members | 1,924 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Hide TabPage

Hey there!
I have a tabcontrol on one of my forms. Some of the tab should not be
accessable (and thus invisible) until you give the correct password. But I
can't hide the tab...
tabSecrets1.Visible=false
tabSecrets1.Hide
will not work, the tab is visible :(

Any help is appreciated
Kejpa
Nov 21 '05 #1
8 7510
Kejpa,

You can add and remove tappages from the tabcontrol using those methods.

With that you have than directly overcome the strange bug in the tabcontrol.

Cor
Hey there!
I have a tabcontrol on one of my forms. Some of the tab should not be
accessable (and thus invisible) until you give the correct password. But I
can't hide the tab...
tabSecrets1.Visible=false
tabSecrets1.Hide
will not work, the tab is visible :(

Any help is appreciated
Kejpa

Nov 21 '05 #2
Hey Cor,
in my form_load event I set pgSecret1.Visible=false but it's still visible.
If I use pgSecret1.Hide it's also there.

I guess I'm too tired to see what's really simple, so.... Just a small
snippet, plz :)

Regards
Kejpa

"Cor Ligthert" <no************@planet.nl> wrote in message
news:eA**************@tk2msftngp13.phx.gbl...
Kejpa,

You can add and remove tappages from the tabcontrol using those methods.

With that you have than directly overcome the strange bug in the tabcontrol.
Cor
Hey there!
I have a tabcontrol on one of my forms. Some of the tab should not be
accessable (and thus invisible) until you give the correct password. But I can't hide the tab...
tabSecrets1.Visible=false
tabSecrets1.Hide
will not work, the tab is visible :(

Any help is appreciated
Kejpa


Nov 21 '05 #3
On Thu, 21 Oct 2004 15:45:06 +0300, Kejpa wrote:
tabSecrets1.Visible=false
tabSecrets1.Hide


Hide and the Visible property of tab pages does NOT work. It has a bug.
In order to make a tab not appear in the tab control, you must REMOVE it
from the tab control using the Remove method.

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
Nov 21 '05 #4
Hey there, all of you.
Guess what?
It's not working, at all. The Visible property is there but has no function,
same thing with the Hide method.

In order to hide it you have to set it's parent to Nothing, it reappear when
you set the parent back to the original control, but not in the original
position.

Guess .NET v 1.0 really should have been .NET v 0.1 :(
Things working swell in VB6 should work with the new framework too, IMHO

/Kejpa

"Kejpa" <kS*******@saj.fi> wrote in message
news:cl**********@gandalf.alcom.aland.fi...
Hey Cor,
in my form_load event I set pgSecret1.Visible=false but it's still visible. If I use pgSecret1.Hide it's also there.

I guess I'm too tired to see what's really simple, so.... Just a small
snippet, plz :)

Regards
Kejpa

"Cor Ligthert" <no************@planet.nl> wrote in message
news:eA**************@tk2msftngp13.phx.gbl...
Kejpa,

You can add and remove tappages from the tabcontrol using those methods.

With that you have than directly overcome the strange bug in the tabcontrol.

Cor
Hey there!
I have a tabcontrol on one of my forms. Some of the tab should not be
accessable (and thus invisible) until you give the correct password.
But I can't hide the tab...
tabSecrets1.Visible=false
tabSecrets1.Hide
will not work, the tab is visible :(

Any help is appreciated
Kejpa



Nov 21 '05 #5
"Kejpa" <kS*******@saj.fi> schrieb:
I have a tabcontrol on one of my forms. Some of the tab should not be
accessable (and thus invisible) until you give the correct password. But I
can't hide the tab...
tabSecrets1.Visible=false
tabSecrets1.Hide
will not work, the tab is visible :(


<URL:http://www.dotnetrix.co.uk/tabcontrols.html>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 21 '05 #6
Kepja,

\\\
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Me.TabControl1.Controls.Remove(Me.TabPage1)
Me.TabControl1.Controls.Remove(Me.TabPage2)
Me.TabControl1.Controls.Remove(Me.TabPage3)
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Me.TabControl1.Controls.Add(Me.TabPage1)
Me.TabControl1.Controls.Add(Me.TabPage2)
Me.TabControl1.Controls.Add(Me.TabPage3)
End Sub
///
Like this?

Cor
"Kejpa" <kS*******@saj.fi>
Hey Cor,
in my form_load event I set pgSecret1.Visible=false but it's still
visible.
If I use pgSecret1.Hide it's also there.

I guess I'm too tired to see what's really simple, so.... Just a small
snippet, plz :)

Regards
Kejpa

"Cor Ligthert" <no************@planet.nl> wrote in message
news:eA**************@tk2msftngp13.phx.gbl...
Kejpa,

You can add and remove tappages from the tabcontrol using those methods.

With that you have than directly overcome the strange bug in the

tabcontrol.

Cor
> Hey there!
> I have a tabcontrol on one of my forms. Some of the tab should not be
> accessable (and thus invisible) until you give the correct password.
> But I > can't hide the tab...
> tabSecrets1.Visible=false
> tabSecrets1.Hide
> will not work, the tab is visible :(
>
> Any help is appreciated
> Kejpa
>
>



Nov 21 '05 #7
GK
Try, Me.TabControl1.TabPages.Remove(pgSecret1)
TabPages.Visible or TabPages.Hide does not work.

KC
"Kejpa" <kS*******@saj.fi> wrote in message
news:cl**********@gandalf.alcom.aland.fi...
Hey Cor,
in my form_load event I set pgSecret1.Visible=false but it's still
visible.
If I use pgSecret1.Hide it's also there.

I guess I'm too tired to see what's really simple, so.... Just a small
snippet, plz :)

Regards
Kejpa

"Cor Ligthert" <no************@planet.nl> wrote in message
news:eA**************@tk2msftngp13.phx.gbl...
Kejpa,

You can add and remove tappages from the tabcontrol using those methods.

With that you have than directly overcome the strange bug in the

tabcontrol.

Cor
> Hey there!
> I have a tabcontrol on one of my forms. Some of the tab should not be
> accessable (and thus invisible) until you give the correct password.
> But I > can't hide the tab...
> tabSecrets1.Visible=false
> tabSecrets1.Hide
> will not work, the tab is visible :(
>
> Any help is appreciated
> Kejpa
>
>



Nov 21 '05 #8
"Chris Dunaway" <"dunawayc[[at]_lunchmeat_sbcglobal[dot]]net"> wrote in
message news:1g****************************@40tude.net...
Hide and the Visible property of tab pages does NOT work. It has a bug.

According to some MVP it's not a bug it's a feature!
The visible property really works!
You can set the visible property of one page to True and the visible
property of the current page to False and then you will see the other page
without changeing the tabheader! THAT's a feature longed for.... NOT!

The Visible property is inherited from Control and that's why it's there,
it's used internally for the TabControl to know which page to show. What I
can't understand is why they didn't set it to Private/Protected.

And I can't understand why the TabVisible(index) property of the VB6
TabbedDialog didn't make the .NET cut?!?

That's my 2c
Kejpa
Nov 21 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: TMB333 | last post by:
I've researched as much as I can on the issue, but I've not found any clearly defined statement that acknowledges that the Hide method for a TabPage object just doesn't do what it's supposed to do....
0
by: Thanos | last post by:
Hi everybody. Excuse my english is not perfect. I would to hide TabPages but I have tried >> TabPage.hide() or >> TabPage.Visible = False but no luck. Maybe the current Tab control...
5
by: Steve | last post by:
Visual Studio 2003 C# Windows: I have a tree view control as my main menu control down the left side of my application. This has 2 Parent Nodes on it (Jobs and Employees). beneath these 2 main...
9
by: Robb Gilmore | last post by:
Hello, This is probably an easy one, but I have not been able to figure it out so far. I have a tab control on a windows forms app. Depending on some business logic, I need to hide/show some...
2
by: MAF | last post by:
How do I hide a tabpage of a given tab control? //Disable other tabs until item is saved this.tabPage2.Hide(); //this doesn't work this.tabPage3.Hide(); this.tabPage4.Hide();
6
by: Siv | last post by:
Hi, I have a form with a TabControl on it, I have 6 tabs across the top of the page. What I'd like to do is have all but the first and second tab visible when the app starts and then as the user...
0
by: xyz | last post by:
Hi, I have two tab control on two different pages. On one tabControl I need the tab headers. When I remove the tabpage from this tabControl and put it on another one I don't want to show the...
5
by: Amit | last post by:
Can anyone write the code to hide tabpage of tab control in windows form 2.0 Thanks, Amit
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.