关于窗口显示的问题
本帖最后由 非典男人 于 2010-1-17 17:37 编辑下图 点击左边的树形列表中的项目 左边Group2的内容也随着点击项目 类别的不同而改变 另外 无论在那个项目 点击 button1和2都是有效的 确定或取消 请指教一下 琢磨了大半天了 搞不定了 希望懂的兄弟能指点一下 谢谢
GUI代码
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TreeViewConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 393, 283, 330, 265)
GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "Form1Minimize")
GUISetOnEvent($GUI_EVENT_MAXIMIZE, "Form1Maximize")
GUISetOnEvent($GUI_EVENT_RESTORE, "Form1Restore")
$TreeView1 = GUICtrlCreateTreeView(8, 16, 121, 225)
$TreeView1_0 = GUICtrlCreateTreeViewItem("项目A", $TreeView1)
$TreeView1_1 = GUICtrlCreateTreeViewItem("项目B", $TreeView1)
$TreeView1_2 = GUICtrlCreateTreeViewItem("项目C", $TreeView1)
$TreeView1_3 = GUICtrlCreateTreeViewItem("项目D", $TreeView1)
$TreeView1_4 = GUICtrlCreateTreeViewItem("项目E", $TreeView1)
$TreeView1_5 = GUICtrlCreateTreeViewItem("项目H", $TreeView1)
GUICtrlSetOnEvent(-1, "TreeView1Click")
$Group1 = GUICtrlCreateGroup("Group1", 136, 16, 241, 161)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Button1 = GUICtrlCreateButton("OK", 160, 200, 75, 25)
GUICtrlSetOnEvent(-1, "Button1Click")
$Button2 = GUICtrlCreateButton("Exit", 256, 200, 75, 25)
GUICtrlSetOnEvent(-1, "Button2Click")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep(100)
WEnd
Func Button1Click()
EndFunc
Func Button2Click()
EndFunc
Func Form1Close()
EndFunc
Func Form1Maximize()
EndFunc
Func Form1Minimize()
EndFunc
Func Form1Restore()
EndFunc
Func TreeView1Click()
EndFunc
帮助里就有例子的。GUICtrlCreateTreeView 太感谢了 假.饭桶 回复 3# 非典男人
LZ改下标题及分类~~
页:
[1]