473,238 Members | 1,743 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,238 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 7499
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
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

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.