#include #include #include "GUIListViewEx.au3" ; Create an array to hold the required data for the combo depending on the row Global $aComboData[10] = ["0|1|2", "1|2|3", "2|3|4", "3|4|5", "4|5|6", "5|6|7", "6|7|8", "7|8|9", "8|9|0", "9|0|1"] $hGUI = GUICreate("Tool", 500, 400) $cLV_1 = GUICtrlCreateListView("Stt Auto|time|start|End|HD", 10, 30, 485, 330, BitOR($LVS_SINGLESEL, $LVS_SHOWSELALWAYS)) _GUICtrlListView_SetExtendedListViewStyle($cLV_1, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES)) _GUICtrlListView_SetColumnWidth($cLV_1, 0, 100) _GUICtrlListView_SetColumnWidth($cLV_1, 1, 90) _GUICtrlListView_SetColumnWidth($cLV_1, 2, 90) _GUICtrlListView_SetColumnWidth($cLV_1, 3, 90) _GUICtrlListView_SetColumnWidth($cLV_1, 4, 90) ; Create array and fill listview Global $aLVArray_1[10][5] For $i = 0 To 9 $sData = "Auto "& $i&"||ht|6" GUICtrlCreateListViewItem($sData, $cLV_1) Next ; Initiate ListView $iLVIndex_1 = _GUIListViewEx_Init($cLV_1, $aLVArray_1) ; Set column edit status _GUIListViewEx_SetEditStatus($iLVIndex_1, 2, 9, _UserFunc) ; 9 = User function _GUIListViewEx_MsgRegister() GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch _GUIListViewEx_EventMonitor() WEnd Func _UserFunc($hHandle, $iIndex, $iRow, $iColumn) ; Create a combo dialog - title shows row number doubleclicked $hGUICombo = GUICreate($iRow, 100, 30,Default,Default,$WS_POPUP) ;$hGUICombo = GUICreate($iRow, X, Y,X1,Y1,$WS_POPUP) ; Create the combo and fill it with the data for the specified row $cCombo = GUICtrlCreateCombo("", 0, 0, 100, 30) GUICtrlSetData($cCombo, $aComboData[$iRow]) GUISetState() While 1 Switch GUIGetMsg() Case $cCombo ConsoleWrite("You selected value: " & GUICtrlRead($cCombo) & @CRLF) GUIDelete($hGUICombo) Return Case $GUI_EVENT_CLOSE GUIDelete($hGUICombo) Return EndSwitch WEnd EndFunc