创建标签选项页(TabItem)控件.
GUICtrlCreateTabItem ( "文本" )
文本 | 控件显示的文本. |
成功: | 返回控件标识符(控件ID). |
失败: | 返回 0. |
#include <GUIConstantsEx.au3>
Example()
Func Example()
Local
$tab
Local
$msg
GUICreate("我的标签选项卡 GUI", 300, 150); 创建居中显示的
GUI 窗口
GUISetBkColor(0x00E0FFFF)
GUISetFont(9, 300)
$tab
= GUICtrlCreateTab(10, 10, 200, 100)
GUICtrlCreateTabItem ("标签 0")
GUICtrlCreateLabel("标记0", 30, 80, 50, 20)
GUICtrlCreateButton("确定0",
20, 50, 50, 20)
GUICtrlCreateInput("默认项", 80, 50, 70, 20)
GUICtrlCreateTabItem ("标签 ----1")
GUICtrlCreateLabel("标记1", 30, 80, 50, 20)
GUICtrlCreateCombo("", 20, 50, 60, 120)
GUICtrlSetData(-1, "资源|数码弹头|拉里|乔恩|泰罗",
"乔恩"); 默认乔恩
GUICtrlCreateButton("确定1",
80, 50, 50, 20)
GUICtrlCreateTabItem ("标签 2")
GUICtrlSetState(-1, $GUI_SHOW);
"默认项"
GUICtrlCreateLabel("标记2", 30, 80, 50, 20)
GUICtrlCreateButton("确定2",
140, 50, 50)
GUICtrlCreateTabItem (""); 结束选项卡项目定义
GUICtrlCreateLabel("点击选项卡, 看窗口标题", 20, 130, 250, 20)
GUISetState()
; 运行 GUI, 直到
GUI 被关闭
While
1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
If $msg = $tab Then
; 显示点击的选项卡
WinSetTitle("我的标签选项卡 GUI", "",
"我的标签选项卡 GUI + " & GUICtrlRead($tab))
EndIf
WEnd
EndFunc ;==>Example
provider with jb51.net (unicode) |