|
-
Nov 6th, 2005, 12:43 AM
#1
Thread Starter
Frenzied Member
TabPage
Hey,
How can I make a tab page invisible or at least disable it depending on a condition. The visible property doesn't seem to be working.
Don't anthropomorphize computers -- they hate it
-
Nov 6th, 2005, 12:51 AM
#2
Re: TabPage
You can set the .Enabled property to False to disable all controls on the desired tab.
VB Code:
Me.Tab1.TabPages.Item(2).Enabled = False
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Nov 6th, 2005, 01:00 AM
#3
Thread Starter
Frenzied Member
Re: TabPage
Setting either the Visible or Enabled property doesn't do anything.
I simply remove the tab page during the formloading if required.
Thanks,
Don't anthropomorphize computers -- they hate it
-
Nov 6th, 2005, 01:06 AM
#4
Re: TabPage
You can remove the page but then your index will change if you Add it back again. Setting the .Enabled property does disable all controls that are on the page. If you dont have any controls on the page then it will not be appearant that its doing anything.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Nov 6th, 2005, 01:15 AM
#5
Thread Starter
Frenzied Member
Re: TabPage
It's the last page so the index will always be the same.
I kind of need it not shown as oppose to disabled.
Thanks a lot for your replies.
Don't anthropomorphize computers -- they hate it
-
Nov 6th, 2005, 11:24 AM
#6
Re: TabPage
Strange bug I think as I tested it and .Visible and .Hide do not have any effect on a tab page. .Enabled does so I guess your only left with .RemoveAt.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
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
|