Jump to content

OS interfering with List View highlighting?


Mbee
 Share

Recommended Posts

My problem is that something -- probably Windows -- is highlighting (showing a gray background) a row in my list view that was never selected (at least not by my program). I know this because I've output logging messages every time a selection is made, and a seemingly arbitrary row is highlighted until I explicitly change the selection. It always happens the first time the list is displayed, but it also seems to happen to other rows under some conditions such as when the user uses the up/down arrows on the keyboard while the focus is not on my app. BTW, I only allow one row to be selected at a time.

I'm using @Melba23's GUIListViewEx UDF, but usually one calls the standard ListView funcs for typical ordinary work.

I could easily work around this if I could find a way to just highlight a particular row, because merely selecting it with _GUICtrlListView_SetItemSelected() followed by _GUICtrlListView_RedrawItems() doesn't change the highlighting. Is there a way to do this? Some other way to highlight a particular row and monitor which row is highlighted when that comes from "outside"?

Changing the background and foreground coloring doesn't help because I have no idea which item has been highlighted externally.

Thanks

Edited by Mbee
Link to comment
Share on other sites

  • 3 weeks later...

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...