BSoft Posted July 31, 2015 Posted July 31, 2015 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)
kylomas Posted July 31, 2015 Posted July 31, 2015 BSoft,_GUICtrlListView_SetSelectionMarkkylomas 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
BSoft Posted July 31, 2015 Author Posted July 31, 2015 Thank you - I did not see this Function. Perfect!
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