473,480 Members | 1,850 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

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
Aug 29 '06 #1
2 6099
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" <se**************@yahoo.comwrote in message
news:ed***********@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
Aug 29 '06 #2
Many thanks.
Set Sample_ListView.SelectedItem = Nothing
solved my problem.

Stefan
Aug 29 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
53650
by: news-server | last post by:
Hi, I was wanting to get a dotted line..Such as they have on http://www.e-cbd.com/ What part of the CSS in dreamweaver is this going to be under? By the way..the part I am talking about is...
4
8486
by: Doors of Perception | last post by:
As you probably know, when you click on a link in MSIE and go to a page, then when you click the "back" button, you see a dotted box outlining the link on which I just clicked. As far as I'm...
1
1334
by: Jasper Recto | last post by:
I have a little program that has several list boxes. If I click on an item in one list box, it highlights the selection. If I click on another item in a DIFFERENT list box, it highlights that...
3
1290
by: Larry | last post by:
I've set up a list of image filesnames in a listview control(lvSrcFileList), I'm using the selectedIndexChange event to select which file is being displayed in a picturebox control(pbImagePreview)....
6
38294
by: sesling | last post by:
I have several forms that use list boxes. These list boxes are used to pass information to command line. The operator is not required to select an item from each box. See below ListBox1 -...
3
17556
by: Joe Cool | last post by:
I have a ListBox on a form than has some items. The select mode is one item only. I select one, it is selected and hightlighted. I then click somewhere in the listbox not on any item, in the clear...
7
3564
by: Brad Pears | last post by:
I have something strange going on - pretty sure it used to work before - and now it does not... Why does the following code not clear a combo box? Me.cboLocation.Text = String.Empty OR ...
1
2620
by: NvrBst | last post by:
I have a ListView (VirtualMode) and I want to implement a SelectAll. --1st Atempt-- The standard for loop takes way to long: "for(int i = 0; i < listView1.VirtualListSize - 1; i++)...
7
2504
by: veenna | last post by:
hi, Following function i am using for validating list box. In list box user can select only 5 item . function Validate() { var lblCount=0; var lbGenre =...
0
7041
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7044
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
4779
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4481
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2995
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2984
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
563
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
181
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.