Jump to content
Sign in to follow this  
sajgon

GUictrlcreatetabitem...

Recommended Posts

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?

Share this post


Link to post
Share on other sites

#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

Share this post


Link to post
Share on other sites

#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

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...