#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
#include <GuiImageList.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
Global $FrmConfirm, $LstPass, $LstFail, $BtnConfirm, $Right, $Left, $Button, $nItem, $nItem1
;Local $exStyles = BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES, $LVS_EX_SUBITEMIMAGES)
Local $exStyles = BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT, $LVS_EX_SUBITEMIMAGES)
$FrmConfirm = GUICreate("Confirm", 505, 385, -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "_GUI")
$LstPass = GUICtrlGetHandle(GUICtrlCreateListView("", 5, 60, 220, 270, BitOR($LVS_REPORT, $LVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE))
_GUICtrlListView_SetExtendedListViewStyle($LstPass, $exStyles)
$LstFail = GUICtrlGetHandle(GUICtrlCreateListView("", 280, 60, 220, 270, BitOR($LVS_REPORT, $LVS_SHOWSELALWAYS), $WS_EX_CLIENTEDGE))
_GUICtrlListView_SetExtendedListViewStyle($LstFail, $exStyles)
$BtnConfirm = GUICtrlCreateButton("Finish", 150, 340, 200, 32)
GUICtrlSetOnEvent(-1, "_GUI")
$Right = GUICtrlCreateButton("->", 230, 140, 46, 50)
GUICtrlSetOnEvent(-1, "_GUI")
$Left = GUICtrlCreateButton("<-", 230, 220, 46, 50)
GUICtrlSetOnEvent(-1, "_GUI")
GUISetState(@SW_SHOW, $FrmConfirm)
; 添加列
_GUICtrlListView_AddColumn($LstPass, "NO", 40)
_GUICtrlListView_AddColumn($LstPass, "LOC", 40)
_GUICtrlListView_AddColumn($LstPass, "Symptom", 140)
; 添加列
_GUICtrlListView_AddColumn($LstFail, "NO", 40)
_GUICtrlListView_AddColumn($LstFail, "LOC", 40)
_GUICtrlListView_AddColumn($LstFail, "Symptom", 140)
; 添加项目
_GUICtrlListView_AddItem($LstPass, "01", 0)
_GUICtrlListView_AddSubItem($LstPass, 0, "Cl", 1, 1)
_GUICtrlListView_AddSubItem($LstPass, 0, "ABC", 2, 2)
_GUICtrlListView_AddItem($LstPass, "03", 1)
_GUICtrlListView_AddSubItem($LstPass, 1, "C3", 1, 2)
_GUICtrlListView_AddSubItem($LstPass, 1, "FEG", 2, 2)
_GUICtrlListView_AddItem($LstPass, "04", 2)
_GUICtrlListView_AddSubItem($LstPass, 2, "D3", 1, 2)
_GUICtrlListView_AddSubItem($LstPass, 2, "DEF", 2, 3)
_GUICtrlListView_SetItemSelected($LstPass, 0, True, True)
While 1
Sleep(10)
WEnd
Func _GUI()
Switch @GUI_CtrlId
Case $BtnConfirm, $GUI_EVENT_CLOSE
Exit
Case $Right
_GUICtrlListView_CopyItems($LstPass, $LstFail, True)
_GUICtrlListView_SetItemSelected($LstPass, 0, True, True)
Case $Left
_GUICtrlListView_CopyItems($LstFail, $LstPass, True)
_GUICtrlListView_SetItemSelected($LstPass, 0, True, True)
EndSwitch
EndFunc ;==>_GUI