Jump to content

Hiding or Disabling Tabs


LondonNDIB
 Share

Recommended Posts

It doesn't appear to be possible to hide or disable a tab in a tab sheet... is this an oversight (couldn't think of a reason why you'd want to do it) or is there some reason for it? Or is it possible and I'm just doing it wrong?

Thanks.

LD

$MyTab= GUICtrlCreateTab( 210, 0, 390, 430 )

$MyTab_TabSheet1 = GUICtrlCreateTabItem( "MyTab1" )

$MyTab_TabSheet2 = GuiCtrlCreateTabItem("MyTab2")

GuiCtrlCreateTabItem("")

GUICtrlSetState ( $MyTab_TabSheet2, $GUI_DISABLE )

Link to comment
Share on other sites

Hmm... when I first posted it was because to me it was a peculiarity... now its becoming more important as I'm not finding a work-around.

The reason I need to hide or (preferably) disable the tab(s) is this:

When working in Tab1, there is a button called "edit" that disables a whole lot of the GUI and turns on some previously disabled controls. They need to hit the "edit" button again (now called "end edit") for everything to go back to normal. Problem is, there is nothing stopping them from switching tabs... one of which is the "config" tab. Ok, well - there is some connection between options set in the "config" tab and the data currently being edited in Tab1! So *if* a user starts to edit, forgets to close the edit and moves to the Config tab they can corrupt the data.

That's worst case. But there's also just the possibility of the user switching tabs and then not realizing why certain things are still disabled. If I can force them to stay on Tab1 then it will become obvious that they have to hit "end edit" first.

LD

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...