Jump to content

Recommended Posts

Posted

GUICtrlCreateTabItem()

GUICtrlCreateInput()

can you make it so that the input xtrl is inside the tabitem

This demo illustrates the basics:

#Include <GuiConstants.au3>

Opt("GuiOnEventMode", 1)

$hGUI = GUICreate("Tab Test", 300, 200)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Quit")

$Tabs = GUICtrlCreateTab(10, 10, 280, 180)

$Tab_0 = GUICtrlCreateTabItem("Tab 0")
$Input_0 = GUICtrlCreateInput("", 20, 100, 260, 20)
$Button_0 = GUICtrlCreateButton("Read Input 0", 100, 140, 100, 30)
GUICtrlSetOnEvent(-1, "_ButtonHit")
GUICtrlCreateTabItem("")

$Tab_1 = GUICtrlCreateTabItem("Tab 1")
$Input_1 = GUICtrlCreateInput("", 20, 100, 260, 20)
$Button_1 = GUICtrlCreateButton("Read Input 1", 100, 140, 100, 30)
GUICtrlSetOnEvent(-1, "_ButtonHit")
GUICtrlCreateTabItem("")

GUISetState()

While 1
    Sleep(20)
WEnd

Func _ButtonHit()
    Switch @GUI_CtrlId
        Case $Button_0
            MsgBox(64, "Input 0", "Input 0 contents: " & GUICtrlRead($Input_0))
        Case $Button_1
            MsgBox(64, "Input 1", "Input 1 contents: " & GUICtrlRead($Input_1))
    EndSwitch
EndFunc

Func _Quit()
    Exit
EndFunc

<_<

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
  • Moderators
Posted

The example in the help file has the example you are asking for under GUICtrlCreateTabItem()... as well as an example of including a button or combo box.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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
  • Recently Browsing   0 members

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