|
-
Dec 22nd, 2006, 11:03 AM
#1
Thread Starter
New Member
Disable TabStrips by User Preference
I have a TabStrip control with 10 prebuilt tabs & a ComboBox Dropdown box with the values 1-10.
I want the user to be able to specify how many tabs are either hidden or disabled (which ever is possible, doesn't really matter which) by chosing 1-10 from then ComboBox Dropdown box.
I already have the tabs constructed and I don't really like usung the SSTab control.
I've been working on this one problem for months now.
Thank you.
-
Dec 22nd, 2006, 11:36 AM
#2
Hyperactive Member
Re: Disable TabStrips by User Preference
Im not sure, but I think enabled is for all the Tabstrip ???
You can check this link for suggestions...
DubweiserTM

If your question has been answered, you can mark a thread as resolved...
-
Dec 22nd, 2006, 12:14 PM
#3
Re: Disable TabStrips by User Preference
Hi
Just a quick question...
when a user selects 2 from the combobox, then you want two tabstrips to get hidden/disabled or you want the 2nd tab to be hidden/disabled ...
Last edited by Siddharth Rout; Dec 22nd, 2006 at 12:17 PM.
Reason: spell check...
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Dec 22nd, 2006, 01:09 PM
#4
Thread Starter
New Member
Re: Disable TabStrips by User Preference
when a user selects 2 from the combobox, then you want two tabstrips to get hidden/disabled or you want the 2nd tab to be hidden/disabled ...
If the user chooses 2 from the combobox, I want the first two tabs to be enabled/visible and the remaining (in this case, eight) to be disabled/hidden.
DubweiserTM, I tried the disable function, but no luck.
If MainOption_NumberOfEvents = 2 Then
TabStrip1.TabEnabled(9) = False
-
Dec 22nd, 2006, 06:25 PM
#5
Re: Disable TabStrips by User Preference
If the user chooses 2 from the combobox, I want the first two tabs to be enabled/visible and the remaining (in this case, eight) to be disabled/hidden.
DubweiserTM, I tried the disable function, but no luck.
Quote:
If MainOption_NumberOfEvents = 2 Then
TabStrip1.TabEnabled(9) = False
Hi
1) In VB6, TabStrip1 doesn't have a TabEnabled property which you can set to 'False'
2) If you want to hide tabs then you need to use SStab in lieu of tabstrip...
3) If you want to disable them (asin users will not be able to use them) then use the below mentioned code...
VB Code:
Private Sub TabStrip1_Click()
'mycount is the value which is passed from the combobox
For i = mycount + 1 To TabStrip1.Tabs.Count
If TabStrip1.SelectedItem.index = i Then
'This ensures that the focus returns to the 1st tab
TabStrip1.Tabs(1).Selected = True
End If
Next i
End Sub
hope this helps...
Last edited by Siddharth Rout; Dec 22nd, 2006 at 06:32 PM.
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Dec 25th, 2006, 10:20 AM
#6
Thread Starter
New Member
Re: Disable TabStrips by User Preference
I am want to use this code to also remove the tab captions.
I am trying to use "TabStrip1.Tabs.Count.Caption = """ but I'm not getting it right.
Can you see what I'm doing wrong?
Thanks.
-
Dec 25th, 2006, 10:39 AM
#7
Re: Disable TabStrips by User Preference
Hi
TabStrip1.Tabs.Count is used to give you the no of tabs in tabstrip... u cannot use .caption property with it...
use the below mentioned code
VB Code:
'where 'i' is the tab no...
TabStrip1.Tabs(i).Caption="your text"
Last edited by Siddharth Rout; Dec 25th, 2006 at 10:42 AM.
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Dec 30th, 2006, 11:28 PM
#8
Thread Starter
New Member
Re: Disable TabStrips by User Preference
Thanks koolsid.
I got another question about the caption.
I want all the "unallowed" tabs to share a similar caption, while the "allowed" tabs have their own.
I tried giving all tabs the same caption, like "UNALLOWED" and then told the program if 01 was selected from the dropdown box, assign that caption as Tab, and if 02 was selected from the dropdown box, assign both tab1 and tab2 as such, and etc.
But this didn't work. Better idea?
Thanks.
-
Dec 31st, 2006, 06:11 AM
#9
Re: Disable TabStrips by User Preference
 Originally Posted by JBHOnline
But this didn't work. Better idea?
What does this mean? What exactly happened when you tried?
-
Dec 31st, 2006, 10:51 AM
#10
Thread Starter
New Member
Re: Disable TabStrips by User Preference
Lemme see...
I have a tabstrip control with 10 tabs.
I also have a dropdown box with 10 options, 01, 02, 03, and etc up to 10.
When the user clicks on an option, such as 02, then the first and second tabs are the only tabs of the control the user can access (thanks to koolsid for that help ).
I am now trying to set it up so when the user selects an option, again, like option 02, for example, the "allowed" tabs, (tabs 01-02 because it was selected via the dropdown box) shows captions of "Event 01" and "Event 02" and the remaining unselected tabs (in this example, 03-10) are all captioned "DEAD" or whatever.
Im not near my usual computer and so Ican't post the script I have so far this second. If you need it, when I get back, I can post it.
Understand? A little confusing to put in words.
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
|