本帖最后由 小A 于 2011-2-24 17:30 编辑
不知道这样行不,#include <ComboConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#Include <GuiListView.au3>
$Form1 = GUICreate("Form1", 623, 442, 192, 124)
$ListView1 = GUICtrlCreateListView("number | name ", 72, 88, 361, 233)
GUICtrlCreateListViewItem("1|big", $ListView1)
GUICtrlCreateListViewItem("2|small", $ListView1)
GUICtrlCreateListViewItem("3|mid", $ListView1)
$combo = GUICtrlCreateCombo("", 192, 24, 113, 25)
GUICtrlSetData(-1,"small|big|mid","small")
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $combo
;ControlDisable($Form1,'',_GUICtrlListView_GetItemParam ($ListView1,2))
$item = ControlListView($Form1,'',$ListView1,"FindItem", GUICtrlRead($combo),1)
If $item <> -1 Then
GUICtrlSetColor(_GUICtrlListView_GetItemParam($ListView1,$item), 0xFF0000)
;MsgBox(0,'',GUICtrlRead($combo))
EndIf
;ControlDisable($Form1,'',$ListView1)
EndSwitch
WEnd
不知道怎么回事,代码粘贴到这里后,就变很好乱了。 |