1 | #Include <GuiListView.au3> |
---|
2 | #include <ListViewConstants.au3> |
---|
3 | #include <WindowsConstants.au3> |
---|
4 | #Include <GUIConstantsEx.au3> |
---|
5 | |
---|
6 | |
---|
7 | Opt("GUIOnEventMode", 1) |
---|
8 | |
---|
9 | $Gui = GUICreate("LV Test", 750, 590, 191, 113) |
---|
10 | |
---|
11 | $Guiplist1 = GUICtrlCreateListView("Name |Score|Kills", 8, 120, 121*3, 431, BitOR($LVS_REPORT, $LVS_SHOWSELALWAYS), BitOR($LVS_EX_HEADERDRAGDROP, $LVS_EX_FULLROWSELECT,$LVS_EX_GRIDLINES,$LVS_EX_DOUBLEBUFFER,$LVS_EX_SUBITEMIMAGES)) |
---|
12 | |
---|
13 | _GUICtrlListView_AddItem($Guiplist1, "TestItem1 with param 1",-1,1) |
---|
14 | _GUICtrlListView_AddItem($Guiplist1, "TestItem2 with param 2",-1,2) |
---|
15 | _GUICtrlListView_AddItem($Guiplist1, "TestItem3 with param 3",-1,3) |
---|
16 | _GUICtrlListView_AddItem($Guiplist1, "TestItem4 with param 4",-1,4) |
---|
17 | _GUICtrlListView_AddItem($Guiplist1, "TestItem5 with param 5",-1,5) |
---|
18 | _GUICtrlListView_AddItem($Guiplist1, "TestItem6 with param 0",-1,0) |
---|
19 | _GUICtrlListView_AddItem($Guiplist1, "TestItem7 with param 10",-1,10) |
---|
20 | |
---|
21 | $Butt1 = GUICtrlCreateButton("Test Button 1",8,90,120,20) |
---|
22 | GUICtrlSetOnEvent(-1,"TestB1") |
---|
23 | $Butt2 = GUICtrlCreateButton("Test Button 2",8+130,90,120,20) |
---|
24 | GUICtrlSetOnEvent(-1,"TestB2") |
---|
25 | $Butt3 = GUICtrlCreateButton("Test Button 3",8+130*2,90,120,20) |
---|
26 | GUICtrlSetOnEvent(-1,"TestB3") |
---|
27 | $Butt4 = GUICtrlCreateButton("Test Button 4",8+130*3,90,120,20) |
---|
28 | GUICtrlSetOnEvent(-1,"TestB4") |
---|
29 | |
---|
30 | |
---|
31 | ConsoleWrite($Butt1&","&$Butt2&","&$Butt3&","&$Butt4& @CRLF) |
---|
32 | |
---|
33 | GUISetOnEvent($Gui_EVENT_CLOSE, "Close", $Gui) |
---|
34 | |
---|
35 | GUISetState() |
---|
36 | |
---|
37 | ConsoleWrite("SetText: "& ControlSetText ( $gui, "", 10 ,"test") & @CRLF) |
---|
38 | |
---|
39 | |
---|
40 | Func Close() |
---|
41 | Exit |
---|
42 | EndFunc ;==>Close |
---|
43 | |
---|
44 | |
---|
45 | While 1 |
---|
46 | Sleep(10) |
---|
47 | WEnd |
---|
48 | ; ################# ######### ################# |
---|
49 | |
---|
50 | |
---|
51 | |
---|
52 | Func TestB1() |
---|
53 | ConsoleWrite("Button1 Click from CtrlID: "& @GUI_CtrlId & @CRLF) |
---|
54 | EndFunc |
---|
55 | |
---|
56 | Func TestB2() |
---|
57 | ConsoleWrite("Button2 Click from CtrlID: "& @GUI_CtrlId & @CRLF) |
---|
58 | EndFunc |
---|
59 | |
---|
60 | Func TestB3() |
---|
61 | ConsoleWrite("Button3 Click from CtrlID: "& @GUI_CtrlId & @CRLF) |
---|
62 | EndFunc |
---|
63 | |
---|
64 | Func TestB4() |
---|
65 | ConsoleWrite("Button4 Click from CtrlID: "& @GUI_CtrlId & @CRLF) |
---|
66 | EndFunc |
---|
67 | |
---|