回复 15# sliqi
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
#include <array.au3>
Dim $listview, $button, $item[100][3], $input1, $msg, $from, $list
$from = GUICreate("listview", 220, 250)
$listview = GUICtrlCreateListView("列 1 |列 2|列 3 ", 10, 10, 200, 150)
_GUICtrlListView_AddColumn($ListView, "列1")
_GUICtrlListView_AddColumn($ListView, "列2")
_GUICtrlListView_AddColumn($ListView, "列3")
For $i=0 to UBound($item)-1
;~ For $n=0 to UBound($item,2)-1
$item[$i][0]="项"&$i
$item[$i][1]="子项"&$i
$item[$i][2]=Random(1,10,1)
;~ Next
Next
_GUICtrlListView_AddArray($ListView,$item)
$button = GUICtrlCreateButton("10修改成abc", 40, 170, 120, 20)
GUISetState()
Do
$msg = GUIGetMsg()
Select
Case $msg = $button
$Search= _ArrayFindAll($item,10,0,0,0,0,2)
_GUICtrlListView_BeginUpdate($listview)
For $i=0 to UBound($Search)-1
_GUICtrlListView_SetItem($listview,"abc",$Search[$i],2)
$item[$Search[$i]][2]="abc"
Next
_GUICtrlListView_EndUpdate($listview)
EndSelect
Until $msg = $GUI_EVENT_CLOSE
|