[2.0-beta.7] ListViewGetContent - Option "Count Col" fails Topic is solved

Report problems with documented functionality
burque505
Posts: 1736
Joined: 22 Jan 2017, 19:37

[2.0-beta.7] ListViewGetContent - Option "Count Col" fails

01 Sep 2022, 12:38

ISSUE: All options for ListViewGetContent work for me with v2.0-beta.7 except "Count Col"

STEPS TO DUPLICATE: Run code below.

Code: Select all

MyGui := Gui()

LV_Label := MyGui.Add("Text", "w400 x10 y10","ListView testing")
LV_Label.SetFont("cBlue s10")
; Create the ListView with two columns, Name and Size:
LV := MyGui.Add("ListView", "r15 w350 x10 y+5", ["Name","Size (KB)"])

Loop Files, A_MyDocuments "\*.*"
  LV.Add(, A_LoopFileName, A_LoopFileSizeKB)

LV_Btn1 := MyGui.Add("Button", "x10 y+10", "Count Columns")
LV_Btn1.OnEvent("Click", LV_CountCol)

MyGui.Show()

LV_CountCol(*) {
    List := ListViewGetContent("Count Col", LV, MyGui)
    MsgBox(List, "Count columns")
    List := ""
}
ERROR MESSAGE:

Code: Select all

Error:  Parameter #1 invalid.

Specifically: Col

	Line#
	006: LV := MyGui.Add("ListView", "r15 w350 x10 y+5", ["Name","Size (KB)"])
	008: Loop Files A_MyDocuments "\*.*"
	009: LV.Add(, A_LoopFileName, A_LoopFileSizeKB)
	012: LV_Btn1 := MyGui.Add("Button", "x10 y+10", "Count Columns")
	013: LV_Btn1.OnEvent("Click", LV_CountCol)
	016: MyGui.Show()
	019: {
--->	020: List := ListViewGetContent("Count Col", LV, MyGui)
	021: MsgBox(List, "Count columns")
	022: List := ""
	023: }
	024: Exit
ALL OTHER OPTIONS TO CONTROL TESTED?
Yes.

For reference only, the code in the spoiler tests all 7 ListViewGetContent options.
Spoiler
burque505
Posts: 1736
Joined: 22 Jan 2017, 19:37

Re: [2.0-beta.7] ListViewGetContent - Option "Count Col" fails

01 Sep 2022, 13:49

@swagfag, thank you for the links.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 13 guests