ListView property for "Rows of Height"?

Get help with using AutoHotkey and its commands and hotkeys
Posts: 233
Joined: 08 Dec 2014, 22:13

ListView property for "Rows of Height"?

15 Dec 2018, 17:30

Not finding anything in AHK forum/AHK documentation or Windows API: Is there a way to determine how many rows of height a ListView is configured for? e.g.

Code: Select all

LV := Gui.Add("ListView", "r20 w700", "Name|Size (KB)")
Is there a property that will tell me that 20 rows will fit in the Listview ("r20")? Or some other way to get this programatically?

I found this link, but not being a c# programmer (and with the contradictory positions in the post), I'm not sure if the answer is in there...
Posts: 469
Joined: 30 Sep 2013, 15:01

Re: ListView property for "Rows of Height"?

16 Dec 2018, 04:12

Try a creative use of:
Something like:
Get height of listview for an estimate, start with that estimate, get approximate rect, and compare

Increase or decrease that estimate and try again as needed
EitherMouse - Multiple mice, individual settings . . . . . . . . forum . . . .
just me
Posts: 7756
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: ListView property for "Rows of Height"?

16 Dec 2018, 04:26

Maybe (for report view):

Code: Select all

MaxVisibleRows := DllCall("SendMessage", "Ptr", LV.Hwnd, "UInt", 0x1028, "Ptr", 0, "Ptr", 0, "Ptr")

Return to “Ask For Help”

Who is online

Users browsing this forum: gero, thebat and 48 guests