Jump to content

ListView Selected Item / Selection Mark


BSoft
 Share

Recommended Posts

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)

 

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