sajgon Posted December 14, 2007 Share Posted December 14, 2007 HI. If i made gui which have 3 different tabs: CODE#include <GuiConstants.au3> guicreate("test",300,200,300,300) GUICtrlCreateTab (3,2, 296,196) $tab1 = GUICtrlCreateTabitem ("tab1") guictrlcreatelabel("TAB 1" , 135,95) $tab2 = GUICtrlCreateTabitem ("tab2") guictrlcreatelabel("TAB 2" , 135,95) $tab3 = GUICtrlCreateTabitem ("tab3") guictrlcreatelabel("TAB 3" , 135,95) guisetstate() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd How can i choose which one will be selected when i run the script? Link to comment Share on other sites More sharing options...
picaxe Posted December 14, 2007 Share Posted December 14, 2007 #include <GuiConstants.au3> GUICreate("test", 300, 200, 300, 300) GUICtrlCreateTab(3, 2, 296, 196) $tab1 = GUICtrlCreateTabItem("tab1") GUICtrlCreateLabel("TAB 1", 135, 95) $tab2 = GUICtrlCreateTabItem("tab2") GUICtrlSetState(-1, $GUI_SHOW) ; make this the focus sheet on startup GUICtrlCreateLabel("TAB 2", 135, 95) $tab3 = GUICtrlCreateTabItem("tab3") GUICtrlCreateLabel("TAB 3", 135, 95) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Link to comment Share on other sites More sharing options...
picaxe Posted December 14, 2007 Share Posted December 14, 2007 #include <GuiConstants.au3> GUICreate("test", 300, 200, 300, 300) GUICtrlCreateTab(3, 2, 296, 196) $tab1 = GUICtrlCreateTabItem("tab1") GUICtrlCreateLabel("TAB 1", 135, 95) $tab2 = GUICtrlCreateTabItem("tab2") GUICtrlSetState(-1, $GUI_SHOW) ; make this the focus sheet on startup GUICtrlCreateLabel("TAB 2", 135, 95) $tab3 = GUICtrlCreateTabItem("tab3") GUICtrlCreateLabel("TAB 3", 135, 95) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd Link to comment Share on other sites More sharing options...
sajgon Posted December 14, 2007 Author Share Posted December 14, 2007 Thx a lot Link to comment Share on other sites More sharing options...
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