Hello guys,
I found that I cannot use both GuiName: inside Gui subcommands and LV_Add function at the same time.
Here is the code to reproduce:
Code: Select all
#SingleInstance, Force
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input
SetWorkingDir, %A_ScriptDir%
Gui, testWin:Add, ListView, vMyListView AltSubmit -ReadOnly R10 w310, Column 1|Column 2|Column 3
Gui, testWin:Show,, Test LV_Add
; Create entries inside ListView
Gui, testWin:ListView, MyListView
Loop, 10 {
LV_Add("", "Column-1 | Row-" A_Index , "Column-2 | Row-" A_Index, "Column-3 | Row-" A_Index)
}
LV_ModifyCol() ; Auto-size each column to fit its contents.
GuiClose(hWnd) {
ExitApp
}
Please help.
Thank you.