Function Reference

_GUICtrlTab_GetItemParam

タブのパラメータデータを取得します。

#Include <GuiTab.au3>
_GUICtrlTab_GetItemParam($hWnd, $iIndex)

 

パラメータ

$hWnd コントロールのハンドル
$iIndex ゼロ始まりのアイテムインデックス

 

返し値

成功: タブのパラメータデータ

 

注意

なし。

 

関連

_GUICtrlTab_SetItemParam

 


#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GuiConstantsEx.au3>
#include <GuiTab.au3>

Opt('MustDeclareVars', 1)

$Debug_TAB = False ; 関数に渡されるClassNameを調べる。動作を確認するにはTrueを設定し、他のコントロールのハンドルを使用

; Warning do not use SetItemParam on items created with GUICtrlCreateTabItem
; Param is the controlId for items created with built-in functions

_Main()

Func _Main()
    Local $hGUI, $hTab

    ; GUIを作成
    $hGUI = GUICreate("(UDF Created) Tab Control Get Item Param", 400, 300)
    $hTab = _GUICtrlTab_Create($hGUI, 2, 2, 396, 296)
    GUISetState()

    ; タブを追加
    _GUICtrlTab_InsertItem($hTab, 0, "Tab 1")
    _GUICtrlTab_InsertItem($hTab, 1, "Tab 2")
    _GUICtrlTab_InsertItem($hTab, 2, "Tab 3")

    ; タブ1のパラメータを取得/設定
    _GUICtrlTab_SetItemParam($hTab, 0, 1234)
    MsgBox(4160, "Information", "Tab 1 parameter: " & _GUICtrlTab_GetItemParam($hTab, 0))

    ; ユーザーが終了するまでループ
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>_Main