Code: Select all
Gui, Add, ListView, r20 w500 gMyListView, Name|Size (KB)
Loop, %A_Desktop%\*.*
LV_Add("", A_LoopFileName, A_LoopFileSizeKB)
LV_ModifyCol()
LV_ModifyCol(2, "Integer")
Gui, Add, Button, gShowName, Show Name
Gui, Show
return
MyListView:
if (A_GuiEvent = "DoubleClick")
{
LV_GetText(RowText, A_EventInfo)
MsgBox, %RowText% ; Works fine
}
return
GuiClose:
ExitApp
ShowName:
LV_GetText(RowText, A_EventInfo)
MsgBox, %RowText% ; Doesn't properly work
return