Connecting Tech Pros Worldwide Forums | Help | Site Map

How to completely (incl. dotted box) unselect an item of a ListView

Stefan Mueller
Guest
 
Posts: n/a
#1: Aug 29 '06
I've a ListView in ReportMode with MultiSelect = False.

If the user enters a number I select the appropriate item in the ListView.

If the used enters a number which is not in the ListView I'd like to
unselect the former selected item. Today I do this with
Sample_ListView.SelectedItem.Selected = False

This works but there is still a dotted box around the former selected item.

Is there a way also to hide the dotted box?
Stefan

PS: The ListView should remain the focus



Randy Birch
Guest
 
Posts: n/a
#2: Aug 29 '06

re: How to completely (incl. dotted box) unselect an item of a ListView


answered in another group.

--

Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/

Please reply to the newsgroups so all can participate.




"Stefan Mueller" <seekware-remove-@yahoo.comwrote in message
news:ed03ha$2h7b$1@news.imp.ch...
I've a ListView in ReportMode with MultiSelect = False.

If the user enters a number I select the appropriate item in the ListView.

If the used enters a number which is not in the ListView I'd like to
unselect the former selected item. Today I do this with
Sample_ListView.SelectedItem.Selected = False

This works but there is still a dotted box around the former selected item.

Is there a way also to hide the dotted box?
Stefan

PS: The ListView should remain the focus


Stefan Mueller
Guest
 
Posts: n/a
#3: Aug 29 '06

re: How to completely (incl. dotted box) unselect an item of a ListView


Many thanks.
Set Sample_ListView.SelectedItem = Nothing
solved my problem.

Stefan


Closed Thread


Similar Visual Basic 4 / 5 / 6 bytes