Go Back   Forum Care Forums > Development Reference Area > Visual Basic

Reply
 
LinkBack Thread Tools Display Modes
How to completely (incl. dotted box) unselect an item of a ListView
Old
  (#1)
Stefan Mueller
Guest
 
Posts: n/a
Default How to completely (incl. dotted box) unselect an item of a ListView - 06-04-2007, 10:30 AM

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


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: How to completely (incl. dotted box) unselect an item of a ListView (MULTIPOST)
Old
  (#2)
Randy Birch
Guest
 
Posts: n/a
Default Re: How to completely (incl. dotted box) unselect an item of a ListView (MULTIPOST) - 06-04-2007, 10:30 AM

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.com> wrote in message
news:ed03ha$2h7b$EMAIL REMOVED...
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


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: How to completely (incl. dotted box) unselect an item of a ListView (MULTIPOST)
Old
  (#3)
Stefan Mueller
Guest
 
Posts: n/a
Default Re: How to completely (incl. dotted box) unselect an item of a ListView (MULTIPOST) - 06-04-2007, 10:30 AM

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

Stefan


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top