Jump to content

[Q] Listview columns selection highlight


Go to solution Solved by Zedna,

Recommended Posts

Zedna, I see that you like this solution. I like it myself.

Hawkysoft, If you mean the light gray background typically used for sorted listviews to indicate the column which is used for the current sorting, then there is an easy solution.

Take a look at the examples for GUICtrlRegisterListViewSort in the help file. These example creates this gray background. Find the while loop. To get rid of the gray background just comment away the two lines as shown in the code box:

Case $lv
  $bSet = 0
  $nCurCol = $nCol
  ;GUICtrlSendMsg($lv, $LVM_SETSELECTEDCOLUMN, GUICtrlGetState($lv), 0)
  ;DllCall("user32.dll", "int", "InvalidateRect", "hwnd", ControlGetHandle($hGUI, "", $lv), "int", 0, "int", 1)
Link to comment
Share on other sites

I have been familiar with ListView CUSTOMDRAW already (use it in my projects)

so it was only few lines of your code, which were new to me ;-)

As I said, very elegant solution.

I like to learn new elegant code snipets, especially in GUI parts

and such very good lesson from your nice code was the best one in several previous years for me :-)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...