List View Not Adding Items

Report problems with documented functionality
User avatar
Delta Pythagorean
Posts: 416
Joined: 13 Feb 2017, 13:44
GitHub: DelPyth
Location: Equestria

List View Not Adding Items

25 Jul 2017, 19:53

So, I've hit a roadblock and I can't find a reason why this is happening.
I've got my entire code here:

Code: [Select all] [Expand] [Download] (LV_Search.ahk)GeSHi © Codebox Plus

And I've got my screenshots on what happened most recently and the Gui it created.
LV Gui.PNG (4.83 KiB) Viewed 239 times

The attachment LV Gui.PNG is no longer available

If you know the reason why or a reason why this happened, please do tell me. Thanks.
Posts: 3
Joined: 12 Jul 2017, 15:58

Re: List View Not Adding Items

25 Jul 2017, 23:53

1) In the "Gui, Main:Add, ListView,..." command, you're not defining any columns. I've never done that before, but it appears to simply create one, un-titled column. Presumably, that's why the ListView header is blank.

2) "LV_ModifyCol()" auto-sizes the column widths to fit your data, so it has to be called AFTER you add data to the ListView. It needs to be after your LV_Add() loop. But since you only have one column, it won't have any affect anyway--the width of the single column is defined by the "w750" given when you created the ListView.

3) In your LV_AddList() function, the "LV_Delete()" removes all rows from the ListView, so the following call to "LV_GetCount()" will always return 0 and your loop never gets executed.

4) Your LV_FilterSearch() function doesn't reference the ListView at all, so it won't have any visible effect. I presume you want something more like this:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

and your "Items" list is properly not necessary at all. Good luck.

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 2 guests