BSoft

ListView Selected Item / Selection Mark

3 posts in this topic

Hi, I am confused about the relationship between the ListView Ctrl Item Selected value and the Selection Mark. I need something that will allow me to add several new Rows to a listview then reset the SelectionMark to the 0 position. The nearest function I could find is the _GUICtrlListView_SetItemSelected function but this does not seem to alter the value returned by _GUICtrlListView_GetSelectionMark. See sample below. In this sample the ConsoleWrite will show 0 for the Selection Mark value in the ConsoleWrite.

_GUICtrlListView_InsertItem($g_hListview1, $ValExternalID, 0)
        _GUICtrlListView_AddSubItem($g_hListview1, 0, $ValTitle, 1)
        _GUICtrlListView_AddSubItem($g_hListview1, 0, "111111111111111", 2)
        
        _GUICtrlListView_InsertItem($g_hListview1, $ValExternalID, 1)
        _GUICtrlListView_AddSubItem($g_hListview1, 1, $ValTitle, 1)
        _GUICtrlListView_AddSubItem($g_hListview1, 1, "111111111111111", 2)
        
        _GUICtrlListView_SetItemSelected($g_hListview1, 0, True, True)
        
        ConsoleWrite("Line172 Selection Mark = " & _GUICtrlListView_GetSelectionMark($g_hListview1) & @CRLF)

 

Share this post


Link to post
Share on other sites



BSoft,

_GUICtrlListView_SetSelectionMark

kylomas


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

Thank you - I did not see this Function. Perfect!

Share this post


Link to post
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