在GUI上創(chuàng)建一個(gè)標(biāo)簽頁(yè)控件項(xiàng)目。
GUICtrlCreateTabItem ( "文本" )
參數(shù)
| 文本 | 控件的文本。 |
返回值
| 成功: | 返回控件標(biāo)識(shí)符(控件ID)。 |
| 失敗: | 返回值為0。 |
注意
若要設(shè)置或修改控件的各種信息請(qǐng)查看 GUICtrlSet....
相關(guān)
GUICtrlSetState, GUIGetMsg
示例
#include <GUIConstants.au3>
GUICreate("我的 GUI 之Tab") ; 創(chuàng)建一個(gè)居中顯示的窗口
GUISetBkColor(0x00E0FFFF)
GUISetFont(9, 300)
$tab=GUICtrlCreateTab (10,10, 200,100)
$tab0=GUICtrlCreateTabitem ("tab0")
GUICtrlCreateLabel ("label0", 30,80,50,20)
$tab0OK=GUICtrlCreateButton ("OK0", 20,50,50,20)
$tab0input=GUICtrlCreateInput ("默認(rèn)文本", 80,50,70,20)
$tab1=GUICtrlCreateTabitem ( "tab----1")
GUICtrlCreateLabel ("label1", 30,80,50,20)
$tab1combo=GUICtrlCreateCombo ("", 20,50,60,40)
GUICtrlSetData(-1,"Trids|CyberSlug|Larry|Jon|Tylo", "Jon") ; 默認(rèn)是 Jon
$tab1OK=GUICtrlCreateButton ("OK1", 80,50,50,20)
$tab2=GUICtrlCreateTabitem ("tab2")
GUICtrlSetState(-1,$GUI_SHOW) ; 這個(gè)標(biāo)簽將先顯示
GUICtrlCreateLabel ("label2", 30,80,50,20)
$tab2OK=GUICtrlCreateButton ("OK2", 140,50,50)
GUICtrlCreateTabitem ("") ; 結(jié)束標(biāo)簽項(xiàng)的定義
GUICtrlCreateLabel ("label3", 20,130,50,20)
GUISetState ()
; 運(yùn)行腳本直到窗口被關(guān)閉
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend
盐源县| 荆州市| 罗定市| 达孜县| 卢湾区| 彭泽县| 葵青区| 徐水县| 奉化市| 兴义市| 邵武市| 张北县| 湟源县| 广宁县| 土默特右旗| 睢宁县| 信阳市| 大厂| 临清市| 南丰县| 基隆市| 进贤县| 剑川县| 保定市| 栾城县| 伊金霍洛旗| 内黄县| 白河县| 乐清市| 辽中县| 玉环县| 井陉县| 称多县| 蓬莱市| 灌南县| 台南县| 綦江县| 张家港市| 金寨县| 河北区| 孝感市|