本帖最后由 auto 于 2012-1-31 21:54 编辑 #include <GuiConstantsEx.au3>
#include <GuiListView.au3>
_Main()
Func _Main()
Local $hListView
GUICreate("ListView Insert Item", 450, 300)
$hListView = GUICtrlCreateListView("", 2, 2, 420, 268)
GUISetState()
; Insert columns
_GUICtrlListView_InsertColumn($hListView, 0, "Column 1", 100)
_GUICtrlListView_InsertColumn($hListView, 1, "Column 2", 100)
_GUICtrlListView_SetColumnWidth($hListView, 0, 200);
_GUICtrlListView_SetColumnWidth($hListView, 1, 200);
; Add items
;_GUICtrlListView_SetColumn($hListView, 0, "111111111", 150, 1)
_GUICtrlListView_InsertItem($hListView, "Item 1", 0)
_GUICtrlListView_InsertItem($hListView, "Item 2", 1)
_GUICtrlListView_InsertItem($hListView, "如何插入数据到第一行的第二列呢?", 0)
; Loop until user exits
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>_Main
|