[LIB] LV_EX - update on 2016-04-28

Post your working scripts, libraries and tools
Guest888

Re: [LIB] LV_EX - update on 2016-04-28

13 May 2016, 21:50

Hi just me,

It will be wonderful if you can combine LV_EX, LV_InCellEdit, LV_Colors to one. Have you ever think about it?

Thank you so much for your brilliant work! :thumbup: :thumbup: :thumbup:
just me
Posts: 4360
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: [LIB] LV_EX - update on 2016-04-28

16 May 2016, 01:35

Hi Guest888,

I think it wouldn't make much sense. LV_EX is primarily a wrapper for list-view control messages. LV_Colors() and LV_InCellEdit() depend on the monitoring and processing of list-view notifications. Both need to run with high performance to avoid issues, so the overhead caused by calling LV_EX functions might be problematic. Also, I didn't believe that LV_Colors() and LV_InCellEdit() will work concurrently without issues, but actually some users seem to do it successfully.
Guest888

Re: [LIB] LV_EX - update on 2016-04-28

17 May 2016, 04:15

Thank you for your explanation. You are the best :thumbup:
canisdibellum
Posts: 45
Joined: 09 Oct 2014, 11:44

Re: [LIB] LV_EX - update on 2016-04-28

01 Aug 2016, 22:06

@just me: sorry for my ignorance....it looks like LV_EX_FindString only searches 1st Column....is there anyway to search other columns?
just me
Posts: 4360
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: [LIB] LV_EX - update on 2016-04-28

02 Aug 2016, 02:45

LV_EX_FindStringEx() ?
canisdibellum
Posts: 45
Joined: 09 Oct 2014, 11:44

Re: [LIB] LV_EX - update on 2016-04-28

02 Aug 2016, 08:10

ah yes....missed that one...thanks!
Guest078

Re: [LIB] LV_EX - update on 2016-04-28

13 Aug 2016, 23:58

Great lib, thanks for creating it!

I was looking for a function that replaces LV_Add() / LV_Insert() but I guess it's out of this scope of this library to add something like that, right?

The reason: My GUI windows consists of several functions with more than one listview (the GUI itself and it's helper functions) and LV_Add() / LV_Insert() operate on what
is last set as the default GUI respect. Gui, ListView, <variable name of the listview>.

All that switching (+ designing of functions) is a bit cumbersome and would be so much easier if we could just use the LV_ commands with a HWND as it's target...
just me
Posts: 4360
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: [LIB] LV_EX - update on 2016-04-28

14 Aug 2016, 01:36

I didn't add replacements for the built-in LV_... functions as yet, but I already thought about.

You might want to try this:

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


For now only options Icon., Check, Focus, and Select are supported.
Guest078

Re: [LIB] LV_EX - update on 2016-04-28

14 Aug 2016, 02:19

Wow!

I didn't test the icon options (yet) but all other work fine in a gui with multiple listviews.

Absolutely outstanding!

Thanks so much, just me :!:
Guest078

Re: [LIB] LV_EX - update on 2016-04-28

14 Aug 2016, 08:05

Btw, there is a small issue with AutoHotkey_H (v2):

I've changed in LVH_Insert:

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

If Rownumber Is Not Integer

with

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

If (type(RowNumber) != "integer")

to not get an error and I use this small example (and both functions at the end of it):

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



https://s4.postimg.org/i9mgca599/testscript.png

When compiled with AutoHotkey_L (and no change), the output in the Index column shows 1, 2, ..., 5
just me
Posts: 4360
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: [LIB] LV_EX - update on 2016-04-28

15 Aug 2016, 01:30

Interesting! I don't use v2, but your issue might be caused by
v2-changes wrote:Expressions
...
Address-of: Since pure numbers and strings are now distinct types, &(var := 123) now returns the address of an int64 instead of the address of a string. ...
...

Source

Seemingly you need some extra work if you have to store a string pointer in a structure and the variable contains a pure number.
lexikos
Posts: 5400
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: [LIB] LV_EX - update on 2016-04-28

16 Aug 2016, 22:30

You just need to convert the value to a string, i.e. Item := Item "".
Guest078

Re: [LIB] LV_EX - update on 2016-04-28

18 Aug 2016, 06:22

Thanks again @just me & @lexikos!

Converting the integer to a string works flawlessly even in AHK v2 / _L :)
qqap

Re: [LIB] LV_EX - update on 2016-04-28

12 Nov 2016, 02:56

LV_EX_SetColumnOrder is didn't work. plz fix it
just me
Posts: 4360
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: [LIB] LV_EX - update on 2016-04-28

12 Nov 2016, 05:17

Hi qqap, would you please post what you have tried?
User avatar
kczx3
Posts: 359
Joined: 06 Oct 2015, 21:39

Re: [LIB] LV_EX - update on 2016-04-28

28 Feb 2017, 21:02

Is there a way to get an array of the rows that are within a group by group ID? I am thinking it'd be sending LVM_GETGROUPINFO with the proper mask for cItems. Currently, I loop over all the rows in the listview and check if they are a part of the specific group. I'd prefer not to loop if possible.
just me
Posts: 4360
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: [LIB] LV_EX - update on 2016-04-28

01 Mar 2017, 04:59

You have to assign the group to each item manually. So why don't you store the items in an array?

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

might be of limited use, because items seem to keep their original index when added to a group.
User avatar
kczx3
Posts: 359
Joined: 06 Oct 2015, 21:39

Re: [LIB] LV_EX - update on 2016-04-28

01 Mar 2017, 09:00

Thanks just me. I definitely can store them in an array. I just figured that the control was maintaining that information so I'd rather pull it from there than keep a second instance of tracking which rows are in which groups. Because of how I have my data structured, I am able to do this:

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

groupLength := LV_GroupGetCount(hwnd, gID, firstItem)
Loop, % groupLength
LV_GetText(ticketSessionID, firstItem + (A_Index - 1), 3)


Thanks again!
User avatar
kczx3
Posts: 359
Joined: 06 Oct 2015, 21:39

Re: [LIB] LV_EX - update on 2016-04-28

02 Mar 2017, 19:05

I am having issues with Tile view and the tiles displaying correctly. The only way I can find that they are getting spaced correctly is when Group View is enabled or toggled at least once. Seems that it causes the control to redraw and it then correctly spaces the tiles (size of the tile doesn't appear to change). I tried using LV_EX_RedrawRows() but it doesn't appear to help.

Simple code where I am seeing the issue:

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



EDIT:

Another example which is a slightly modified sample from you, just me:

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



Notice how when you first check the Tile View checkbox, the tiles are overlapping. But if you uncheck, and then check the Tile View box again, the tiles are properly oriented.
just me
Posts: 4360
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: [LIB] LV_EX - update on 2016-04-28

03 Mar 2017, 04:24

Seemingly the auto-sizing of the tiles is done only once when the tile view is activated. So you have to change the tile view settings before you activate the view.

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


Return to “Scripts and Functions”

Who is online

Users browsing this forum: Bon and 14 guests