AHK Listview Height adjusting to how many rows there are?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
gallaxhar
Posts: 143
Joined: 03 Sep 2014, 06:35

AHK Listview Height adjusting to how many rows there are?

15 Apr 2016, 17:23

I have a listview gui that I dynamically add/remove rows from
The problem is, when I delete all but say 5 rows, there is a large blank area beneath the 5th row.
Is there a way to adjust the height of a listview as rows are added/deleted (up to a maximum value of 7 rows visible for example).

If not, is there an alternative to the native AHK listview I can use? Maybe an html listview?
User avatar
kczx3
Posts: 1649
Joined: 06 Oct 2015, 21:39

Re: AHK Listview Height adjusting to how many rows there are?

15 Apr 2016, 19:05

Check out LV_EX by just me. The first function, LV_EX_CalcViewSize should help you. It will tell you the approximate size required to display a certain number of rows. You can delete the rows, call LV_GetCount(), then call LV_EX_CalcViewSize() with the rows parameter you just received. Then adjust the ListView size based on the H property of the returned object from LV_EX_CalcViewSize[/]. I think...

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: peter_ahk, Rauvagol and 337 guests