Jump to content

Hiding a TabItem


zeevid
 Share

Recommended Posts

I have a gui that contains a table with two tab items.

Based on some condition, I want to hide one tab and show another. The code that I've written doesn't seem to do anything at all.

I'm using the v3 beta. Any ideas?

$tabUpdate = GUICtrlCreateTabitem("Update Audit Data")

$Label_14 = GuiCtrlCreateLabel("Audit Information", 30, 180, 100, 20)

$Label_15 = GuiCtrlCreateLabel("Manager Approved/Denied:", 30, 230, 160, 20)

$cboManagerApproved = GuiCtrlCreateCombo("", 200, 230, 120, 21)

$tabSponsorUpdate = GUICtrlCreateTabItem("Sponsor Update")

GUICtrlCreateTabitem ("") ; end tabitem definition

GuiSetState()

If $Admin_Logged_On = "No" Then

GUICtrlSetState($tabUpdate,$GUI_DISABLE+$GUI_HIDE)

GUICtrlSetState($tabSponsorUpdate,$GUI_ENABLE+$GUI_SHOW)

Else

GUICtrlSetState($tabUpdate,$GUI_ENABLE+$GUI_SHOW)

GUICtrlSetState($tabSponsorUpdate,$GUI_DISABLE+$GUI_HIDE)

EndIf

Thank you.

Link to comment
Share on other sites

I have a gui that contains a table with two tab items.

Based on some condition, I want to hide one tab and show another. The code that I've written doesn't seem to do anything at all.

I'm using the v3 beta. Any ideas?

$tabUpdate = GUICtrlCreateTabitem("Update Audit Data")

$Label_14 = GuiCtrlCreateLabel("Audit Information", 30, 180, 100, 20)

$Label_15 = GuiCtrlCreateLabel("Manager Approved/Denied:", 30, 230, 160, 20)

$cboManagerApproved = GuiCtrlCreateCombo("", 200, 230, 120, 21)

$tabSponsorUpdate = GUICtrlCreateTabItem("Sponsor Update")

GUICtrlCreateTabitem ("") ; end tabitem definition

GuiSetState()

If $Admin_Logged_On = "No" Then

GUICtrlSetState($tabUpdate,$GUI_DISABLE+$GUI_HIDE)

GUICtrlSetState($tabSponsorUpdate,$GUI_ENABLE+$GUI_SHOW)

Else

GUICtrlSetState($tabUpdate,$GUI_ENABLE+$GUI_SHOW)

GUICtrlSetState($tabSponsorUpdate,$GUI_DISABLE+$GUI_HIDE)

EndIf

Thank you.

How about something like:

If $Admin_Logged_On = "No" Then
  $tabSponsorUpdate = GUICtrlCreateTabItem("Sponsor Update")
Else
  $tabUpdate = GUICtrlCreateTabitem("Update Audit Data")
  $Label_14 = GuiCtrlCreateLabel("Audit Information", 30, 180, 100, 20)
  $Label_15 = GuiCtrlCreateLabel("Manager Approved/Denied:", 30, 230, 160, 20)
  $cboManagerApproved = GuiCtrlCreateCombo("", 200, 230, 120, 21)
EndIf
GUICtrlCreateTabitem (""); end tabitem definition

GuiSetState()

Or something like that. ;)

Link to comment
Share on other sites

How about something like:

If $Admin_Logged_On = "No" Then
  $tabSponsorUpdate = GUICtrlCreateTabItem("Sponsor Update")
Else
  $tabUpdate = GUICtrlCreateTabitem("Update Audit Data")
  $Label_14 = GuiCtrlCreateLabel("Audit Information", 30, 180, 100, 20)
  $Label_15 = GuiCtrlCreateLabel("Manager Approved/Denied:", 30, 230, 160, 20)
  $cboManagerApproved = GuiCtrlCreateCombo("", 200, 230, 120, 21)
EndIf
GUICtrlCreateTabitem (""); end tabitem definition

GuiSetState()

Or something like that. ;)

You know, I didn't think to do it that way. Thank you.

Still, can you hide Tab Items???

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...