Page 1 of 1

[SOLVED] Custom selected color in ListView

Posted: 03 Oct 2013, 11:54
by tmplinshi
A few days ago I found an AutoIt script, which create a Ownerdraw listview, it looks like:
Image
This is what I was looking for all the time. It has a custom highlight (selected) color! How to do it in ahk? The AutoIt code:

[Spoiler]

Code: [Select all] [Expand] [Download] (LV_CustomSelectedColor.au3)GeSHi © Codebox Plus

[/Spoiler]

Re: Ownerdraw listview?

Posted: 03 Oct 2013, 16:48
by Zelio
There are ton of example on the old forum, libraries to use are for example LVX, LVA, RAGRID. Do some search with words "autohotkey colored listview". But maybe better to wait an expert, maybe someone updated an old library this years.

sample from Poly :
http://www.autohotkey.com/board/topic/2 ... -controls/
http://www.autohotkey.net/~Titan/dl/LVX.zip

You will have to play with event when row are selected or not, control leaved or not, ...

Re: Ownerdraw listview?

Posted: 04 Oct 2013, 01:18
by tmplinshi
Thanks Zaelia. But we will see a default selected color first (for about 0.1 seconds). For example:

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


Re: Custom selected color in ListView

Posted: 04 Oct 2013, 03:38
by just me
Of course, it can be done:

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



Edit: Changed script!

Re: Custom selected color in ListView

Posted: 04 Oct 2013, 04:16
by tmplinshi
Thanks a lot, just me! Works like a charm! :mrgreen:

Re: [SOLVED] Custom selected color in ListView

Posted: 04 Oct 2013, 05:23
by tmplinshi
Luckily, I copied 2 lines from your Class_TransparentListBox, now the text color changes too :D

[spoiler]

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


[/spoiler]