本帖最后由 lixiaolong 于 2010-12-15 00:20 编辑
一个简单例子:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt('MustDeclareVars', 1)
Example()
Func Example()
Local $listview, $button, $item1, $item2, $item3, $msg
GUICreate("listview items", 220, 250, 100, 200, -1, $WS_EX_ACCEPTFILES)
GUISetBkColor(0x00E0FFFF) ; 设置背景色
$listview = GUICtrlCreateListView("列 1 |列 2|列 3 ", 10, 10, 200, 150);,$LVS_SORTDESCENDING)
$button = GUICtrlCreateButton("点这里", 40, 170, 120, 20)
$item1 = GUICtrlCreateListViewItem("项目 2|子项 22|子项 23", $listview)
$item2 = GUICtrlCreateListViewItem("............item1|子项 12|子项 13", $listview)
$item3 = GUICtrlCreateListViewItem("项目 3|子项 32|子项 33", $listview)
GUISetState()
Do
$msg = GUIGetMsg()
Select
Case $msg = $button
GUICtrlSetData($listview, " | | |")
GUICtrlSetData($item1, " | | |")
GUICtrlSetData($item2, " | | |")
GUICtrlSetData($item3, " | | |")
EndSelect
Until $msg = $GUI_EVENT_CLOSE
EndFunc ;==>Example
可能不是你要求的... |