[SOLVED] Custom selected color in ListView

Get help with using AutoHotkey and its commands and hotkeys
tmplinshi
Posts: 1242
Joined: 01 Oct 2013, 14:57

[SOLVED] Custom selected color in ListView

03 Oct 2013, 11:54

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]
Last edited by tmplinshi on 04 Oct 2013, 04:17, edited 12 times in total.
Zelio
Posts: 275
Joined: 30 Sep 2013, 00:45
Location: France

Re: Ownerdraw listview?

03 Oct 2013, 16:48

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, ...
tmplinshi
Posts: 1242
Joined: 01 Oct 2013, 14:57

Re: Ownerdraw listview?

04 Oct 2013, 01:18

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

just me
Posts: 5459
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: Custom selected color in ListView

04 Oct 2013, 03:38

Of course, it can be done:

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



Edit: Changed script!
tmplinshi
Posts: 1242
Joined: 01 Oct 2013, 14:57

Re: Custom selected color in ListView

04 Oct 2013, 04:16

Thanks a lot, just me! Works like a charm! :mrgreen:
tmplinshi
Posts: 1242
Joined: 01 Oct 2013, 14:57

Re: [SOLVED] Custom selected color in ListView

04 Oct 2013, 05:23

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]

Return to “Ask For Help”

Who is online

Users browsing this forum: dot64, Exaskryz and 61 guests