I am tring to create a 2 listview in one gui. everyting working fine except delete option. I have assigned delete option in right click. Delete option working for 2nd list but not sure how to make this workable for 1st list. Even, it is deleting the row from 2nd list whether row is seleted from 1st list.
Here is my code
Code: Select all
Gui, Add, ListView, x10 y35 h200 w380 vlist1, Name |Date Created Menu, MyContextMenu, Add, Delete, Delete Gui, Add, ListView, x10 y250 h200 w380 vlist2, Name |Date Created Gui, Show, x500 y200 h500 w400, The List Gui,1:ListView, list1 Loop, %A_ScriptDir%\Temp_Files\*.* LV_Add("", A_LoopFileName, A_LoopFileTimeCreated) Gui,1:ListView, list2 Loop, %A_ScriptDir%\Other_Temp_Files\*.* LV_Add("", A_LoopFileName, A_LoopFileTimeCreated) Return GuiContextMenu: LV_GetText(RowText, A_EventInfo) Menu, MyContextMenu, Show, %A_GuiX%, %A_GuiY% Return Delete: FileDelete, %A_ScriptDir%\Temp_Files\%RowText% Rownumber := LV_GetNext(RowText, "F") LV_Delete(Rownumber) Return