Function Reference


_GUICtrlTab_ClickTab

Clicks a tab

#include <GuiTab.au3>
_GUICtrlTab_ClickTab ( $hWnd, $iIndex [, $sButton = "left" [, $bMove = False [, $iClicks = 1 [, $iSpeed = 1]]]] )

Parameters

$hWnd Control ID/Handle to the control
$iIndex Specifies the 0-based index of the item
$sButton [optional] Button to click with
$bMove [optional] If True, the mouse will be moved. If False, the mouse does not move.
$iClicks [optional] Number of clicks
$iSpeed [optional] Mouse movement speed

Return Value

None.

Example

#include <GUIConstantsEx.au3>
#include <GuiTab.au3>

Example()

Func Example()
        Local $idTab

        ; Create GUI
        GUICreate("Tab Control Click Tab", 400, 300)
        $idTab = GUICtrlCreateTab(2, 2, 396, 296)
        GUISetState(@SW_SHOW)

        ; Add tabs
        _GUICtrlTab_InsertItem($idTab, 0, "Tab 1")
        _GUICtrlTab_InsertItem($idTab, 1, "Tab 2")
        _GUICtrlTab_InsertItem($idTab, 2, "Tab 3")

        ; Click Tab
        _GUICtrlTab_ClickTab($idTab, 1, "left", True, 100)

        ; Loop until the user exits.
        Do
        Until GUIGetMsg() = $GUI_EVENT_CLOSE
        GUIDelete()
EndFunc   ;==>Example