Mbee Posted August 25, 2019 Share Posted August 25, 2019 (edited) 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 August 25, 2019 by Mbee Link to comment Share on other sites More sharing options...
dmob Posted September 12, 2019 Share Posted September 12, 2019 Try _GUICtrlListView_ClickItem() Mbee 1 Link to comment Share on other sites More sharing options...
Mbee Posted September 15, 2019 Author Share Posted September 15, 2019 On 9/12/2019 at 2:19 AM, dmob said: Try _GUICtrlListView_ClickItem() I will, thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now