|
-
Jun 12th, 2006, 08:25 PM
#1
Thread Starter
Member
[2005] TabControl
Is it possible so that when you only have one tab open it won't show the tab list on top of the control. I've been trying to make the tabs hide when only one is opened and cannot seem to find a way...
-
Jun 12th, 2006, 08:49 PM
#2
Re: [2005] TabControl
It's not possible using just the functionality provided by the TabControl. What you could do is rather than placing your controls directly on the TabPages you could place a Panel on each TabPage and then the other controls on the Panels. If there is only one TabPage you could hide the TabControl, remove the Panel from the TabPage and place it directly on the form, with the same Location and Size as the TabControl. If another TabPage is added you simply remove the Panel from the form, place it back on the TabPage and make the TabControl visible again.
-
Jun 12th, 2006, 08:59 PM
#3
Thread Starter
Member
Re: [2005] TabControl
Hmm good thinking. I'll have to try to do that.
-
Jun 12th, 2006, 09:32 PM
#4
Thread Starter
Member
Re: [2005] TabControl
Works like a charm, and was a lot simpler then I had expected. Thanks.
-
Jun 12th, 2006, 09:38 PM
#5
Thread Starter
Member
Re: [2005] TabControl
Damn.. spoke too soon. I got it to hide fine, but I can't seem to get the panel back INTO the tabcontrol.
VB Code:
pnlMain.Parent = Me
tclMain.Hide()
That is all it takes to close the tabs, but what do I load as the Parent when I'm going back into the tabcontrol? I tried a few things but nothing worked.
-
Jun 12th, 2006, 09:52 PM
#6
Re: [2005] TabControl
I already told you in my previous post: the TabPage. If there's only one TabPage then it will be:
VB Code:
pnlMain.Parent = tclMain.TabPages(0)
-
Jun 12th, 2006, 09:55 PM
#7
Thread Starter
Member
Re: [2005] TabControl
Haha oops. I was trying TabIndex(0).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|