Thanks a lot for clarification krool . You are right aboutbut I will add the word Fully before the word selected . And I mean by fully : the item is Selected and the Item_Select event is raised asCode:The AutoSelectFirstItem just controls if it is also being selectedand selected too regardless of AutoSelectFirstItem property but the event is not fired in absence of AutoSelect or when set to false .The first item is always focused
Directly after the ListView population , this code returns 1
But , with AutoSelectFirstItem set to True, the Item_Select event is fired , otherwise , it is not - although being focused and selected - . Anyway , this is intrinsic behavior and it is better to be not touched as I guess you prefer . That`s why I think MS added the property AutoSelectFirstItem : to select the first item then raises the event Item_Select as it is not raised at the point after the list item is populated although the item is already selected .Code:Msgbox ListView1.selectedItem.Index




Reply With Quote