zeevid Posted September 29, 2005 Posted September 29, 2005 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.
AutoChris Posted September 29, 2005 Posted September 29, 2005 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 definitionGuiSetState()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)EndIfThank 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.
zeevid Posted September 30, 2005 Author Posted September 30, 2005 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???
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now