[Class] LV_Colors - 1.1.05.00 (2024-03-16)

Post your working scripts, libraries and tools for AHK v1.1 and older
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: [Class] LV_Colors - update on 2015-03-27

28 Mar 2015, 08:03

Thanks for the update - AlternateRows() is a nice feature but I find it hard to find a combination that keeps the text colour good to read, so I wonder if an AlternateRowsBG() would be useful which would just alternate the background colours, that way you can keep the text black and alternate the background color in muted tones for example. Of course easy to make using Row() but as you now have the framework for AlternateRows() in place already you might consider it.
just me
Posts: 9424
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: [Class] LV_Colors - update on 2015-03-27

29 Mar 2015, 05:36

Hello list,

if you don't want to change the text color, just omit the TxColor parameter.
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: [Class] LV_Colors - update on 2015-03-27

29 Mar 2015, 06:48

Thanks, that works perfectly.
Guest

Re: [Class] LV_Colors - update on 2015-03-27

30 Mar 2015, 01:51

Updated to newest version of Class_LV_Colors (1.1.00.00), and now I get this error:

Code: Select all

Error:  Call to nonexistent function.

Specifically: ObjBindMethod(This, "On_WM_Notify")

	Line#
--->	1419: This.OnMessageFunc := ObjBindMethod(This, "On_WM_Notify")
But your test example doesn't have this issue.

Win 7 64
AHK v1.1.21.00

Any clue?
Dank U
just me
Posts: 9424
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: [Class] LV_Colors - update on 2015-03-31

31 Mar 2015, 02:28

Guest, seems like the script you're running doesn't run with AHK 1.1.20+.

*minor update*
Guest

Re: [Class] LV_Colors - update on 2015-03-31

31 Mar 2015, 03:45

Hehe, I was running it under the latest version of ahk, it's just that I auto-compile and the bin file was old.
By the way, you're using item as variable name in your class, such words are too common to be used in a class/lib, I'm using it as a global variable, it took me 30 minutes to figure out why my script doesn't work after updating to the new version of your class. Can you please consider using unique variable names?

thanks :)
Guest

Re: [Class] LV_Colors - update on 2015-03-31

31 Mar 2015, 03:55

Nevermind, new version seems to be too buggy, now my GUI keeps getting stuck, I think it's the critical issue you mentioned in your comment.
Reverting to the old version.
just me
Posts: 9424
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: [Class] LV_Colors - update on 2015-03-31

31 Mar 2015, 05:29

Guest wrote:By the way, you're using item as variable name in your class, such words are too common to be used in a class/lib, I'm using it as a global variable, it took me 30 minutes to figure out why my script doesn't work after updating to the new version of your class. Can you please consider using unique variable names?
I think that you shouldn't use common words for your Global vars if you want to use third party classes.

Did you set Critical? The old version was using Critical := 100 as default.
tmplinshi
Posts: 1604
Joined: 01 Oct 2013, 14:57

Re: [Class] LV_Colors - update on 2015-03-31

06 Apr 2015, 10:39

StaticMode not working.

Test code:

Code: Select all

#Include, <Class_LV_Colors>

Gui, Add, ListView, w600 r15 Grid -ReadOnly vVLV hwndHLV, Column 1
   LV_Add("", "11111111")
Gui, Show

CLV := New LV_Colors(HLV, True) ; StaticMode not working.
CLV.OnMessage()
CLV.Row(1, 0xFAF305)
Return

GuiClose:
ExitApp
Tested on:
LV_Colors: 2015-03-31 (v1.1.01.00)
AutoHotkey: v1.1.21.02 U32
OS: Win7 x64
Thanks.

Edit: Seems another bug: CLV := New LV_Colors(HLV2, False, True, NoSizing := False) can't make the listview header resizable.
just me
Posts: 9424
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: [Class] LV_Colors - update on 2015-03-31

07 Apr 2015, 03:19

Hi tmplinshi, thanks for reporting. Should be fixed now.
tmplinshi
Posts: 1604
Joined: 01 Oct 2013, 14:57

Re: [Class] LV_Colors - 1.1.02.00 (2015-04-07)

07 Apr 2015, 04:15

Thank you, works now. :)

...Found another small issue :silent: : When dragging the LV header, the listview becomes unstable (row data and color will disappear).
See gif image below (Click the image to play).
clv_drag.gif
You may not able to reproduce this issue, since it won't appear often.
Test code
just me
Posts: 9424
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: [Class] LV_Colors - 1.1.02.00 (2015-04-07)

07 Apr 2015, 05:27

You might need to set CLV.Critical, because the new default is Critical := "Off".

Also, CLV.OnMessage() isn't required any more.
tmplinshi
Posts: 1604
Joined: 01 Oct 2013, 14:57

Re: [Class] LV_Colors - 1.1.02.00 (2015-04-07)

07 Apr 2015, 07:54

Thanks! CLV.Critical := 500 works for me.
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: [Class] LV_Colors - 1.1.02.00 (2015-04-07)

07 Apr 2015, 14:31

I've been using the last few versions and now v1.1.02.00 as well, I do tend to notice that at random (meaning I can't reproduce it) the listview control either: 1 - freezes (refuses to update), 2 - completely disappears (where the LV should be there is just a gray rectangle) 3 - and sometimes (not all the time) when 1 & 2 happen Gui hotkeys (#IfWinActive) stop responding (e.g esc to close the gui or scrolling don't work) - when 3 happens I have to kill the script - if 1 or 2 happens I can redraw the gui (gui, destroy) and it will work again.

I have tried with and without .critical

It happens on win7/32 bit and Win8/64

Like I said I can't reproduce it consistently but it does happen from time to time, not that the above helps but I thought I report it anyway - not saying it is your class either, it could very well be a combination of factors including poor coding skills on my part.
just me
Posts: 9424
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: [Class] LV_Colors - 1.1.02.00 (2015-04-07)

07 Apr 2015, 22:09

Hello list,

this is a known problem with ListViews and also TreeViews, last discussed here and not solved until now. It seems to be related to the way AHK is 'buffering' messages/events.
list
Posts: 221
Joined: 26 Mar 2014, 14:03
Contact:

Re: [Class] LV_Colors - 1.1.02.00 (2015-04-07)

08 Apr 2015, 13:27

Thank you for the additional info!
tmplinshi
Posts: 1604
Joined: 01 Oct 2013, 14:57

Re: [Class] LV_Colors - 1.1.02.00 (2015-04-07)

11 Apr 2015, 08:43

Bug report: Cell color goto wrong row number, when using 'StaticMode'.

Code: Select all

Gui, Add, ListView, w300 Grid HwndHLV, Column 1|Column 2|Column 3
Loop, 3
	LV_Add("", 111, 222, 333)
Gui, Show

#Include, <Class_LV_Colors>
CLV := New LV_Colors(HLV, True) ; StaticMode
CLV.Cell(2, 2, 0x000000) ; <--- color should in row 2, but the result is in row 3.
Return

GuiClose:
ExitApp
Last edited by tmplinshi on 11 Apr 2015, 09:00, edited 1 time in total.
just me
Posts: 9424
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: [Class] LV_Colors - 1.1.02.00 (2015-04-07)

11 Apr 2015, 08:55

Hello tmplinshi,

thanks for reporting.

It's a missing dot in the Cell() method:

Code: Select all

   Cell(Row, Col, BkColor := "", TxColor := "") {
      If !(This.HWND)
         Return False
      If ThisIsStatic ; <<<<< has to be This.IsStatic
It will be fixed soon.
tmplinshi
Posts: 1604
Joined: 01 Oct 2013, 14:57

Re: [Class] LV_Colors - 1.1.02.00 (2015-04-07)

11 Apr 2015, 09:12

Thanks! works after adding a dot.
just me
Posts: 9424
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: [Class] LV_Colors - 1.1.03.00 (2015-04-12)

12 Apr 2015, 00:52

*update 1.1.03.00*

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 135 guests