473,320 Members | 2,000 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Highlighting a ListView item when the ListView does not have focus

Hi,

Is there any way I can keep an item in a ListView higlighted even when
the ListView does not have focus.

eg. If the user is modifying the row by entering values in a TextBox
then the TextBox has focus, but I still want the corresponding row in
the ListView to be higlighted. Is this possible?

Hope to hear from someone out there. Links to articles that describe
how to do this would be great. Thanx.
Nov 16 '05 #1
3 9079
Set this property

ListView1.HideSelection = false;

--
Shak
(Houston)
"Rookie" <do***********@rediffmail.com> wrote in message
news:cf**************************@posting.google.c om...
Hi,

Is there any way I can keep an item in a ListView higlighted even when
the ListView does not have focus.

eg. If the user is modifying the row by entering values in a TextBox
then the TextBox has focus, but I still want the corresponding row in
the ListView to be higlighted. Is this possible?

Hope to hear from someone out there. Links to articles that describe
how to do this would be great. Thanx.

Nov 16 '05 #2
check out the ListView.HideSelection property. Set it to false and
your problem should be fixed.

Cheers,
Allen Anderson
http://www.glacialcomponents.com
mailto: allen@put my website base here.com

On 12 Jul 2004 09:28:02 -0700, do***********@rediffmail.com (Rookie)
wrote:
Hi,

Is there any way I can keep an item in a ListView higlighted even when
the ListView does not have focus.

eg. If the user is modifying the row by entering values in a TextBox
then the TextBox has focus, but I still want the corresponding row in
the ListView to be higlighted. Is this possible?

Hope to hear from someone out there. Links to articles that describe
how to do this would be great. Thanx.


Nov 16 '05 #3
Set the HideSelection property of the ListView to false.

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
"Rookie" <do***********@rediffmail.com> schrieb im Newsbeitrag
news:cf**************************@posting.google.c om...
Hi,

Is there any way I can keep an item in a ListView higlighted even when
the ListView does not have focus.

eg. If the user is modifying the row by entering values in a TextBox
then the TextBox has focus, but I still want the corresponding row in
the ListView to be higlighted. Is this possible?

Hope to hear from someone out there. Links to articles that describe
how to do this would be great. Thanx.

Nov 16 '05 #4

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

Similar topics

0
by: keith | last post by:
In a ListView control (two columns), I added a few ListView items. ListView listview=new ListView(); listview.Parent=this; listview.View=View.Details; listview.Columns.Add...
1
by: cider123 | last post by:
I've tried working with the SelectedIndices and Items.Selected attributes to get the problem to go away, but not having any luck. Questions I have are: 1) How do you move (using code) the...
1
by: Shane | last post by:
I have a text box select items in a listview as text is being typed into the text box. I get the select bar to move correctly in the Listview control. If the user presses the down or up key in...
4
by: Shane | last post by:
I have a text box select items in a listview as text is being typed into the text box. I get the select bar to move correctly in the Listview control. If the user presses the down or up key in...
5
by: Matt Michael | last post by:
Hi, I'm having a problem working with a listview in an application I'm writing. Currently, whenever the selectedindex changed event fires, it loads up a htmledit control, and other labels on the...
2
by: Mike | last post by:
Ok I'm having a problem with a listview. I have a listview on a WinForm called ProgramInformationFrm. I call this from from 2 other forms. One is ProgramSearch Frm, the other is OpenNCFrm. The...
6
by: Rich Raffenetti | last post by:
I have a form with a listview control and a textbox. When I change focus from the listview to the textbox, the highlighted item on the listview loses the highlight. That is not the behavior I...
0
by: =?Utf-8?B?SWdvcg==?= | last post by:
Hi everyone! I have some strange behavior of ListView control in WPF. We are developing application in C#. I created ListView with some items and set SelectedIndex to some index in the...
12
by: Tom Bean | last post by:
I am trying to display a ContextMenuStrip when a user right-clicks on an item in a ListView and have encountered a something that seems strange to me. When the ListView is initially populated,...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.