473,654 Members | 3,097 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

listview loses highlighted item

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 need.

I am using VB2008 express. I see that the behavior of a similar program in
VB6 is the same.

When the controls are a listbox and a textbox, the highlighted item remains
highlighted when changing focus to the textbox. So I might guess that this
can be done with a listview.

Am I missing something or just out of luck?
Dec 2 '07 #1
6 5658

"Rich Raffenetti" <rich@raffenett i_takethisout.c omwrote in message
news:uO******** ******@TK2MSFTN GP03.phx.gbl...
>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 need.

I am using VB2008 express. I see that the behavior of a similar program
in VB6 is the same.

When the controls are a listbox and a textbox, the highlighted item
remains highlighted when changing focus to the textbox. So I might guess
that this can be done with a listview.

Am I missing something or just out of luck?
Set the HideSelection property of the ListView to false to stop that
behaviour.

Hope this helps
Lloyd Sheen

Dec 2 '07 #2

"Lloyd Sheen" <a@b.cwrote in message
news:ep******** ******@TK2MSFTN GP03.phx.gbl...
>
"Rich Raffenetti" <rich@raffenett i_takethisout.c omwrote in message
news:uO******** ******@TK2MSFTN GP03.phx.gbl...
>>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 need.

I am using VB2008 express. I see that the behavior of a similar program
in VB6 is the same.

When the controls are a listbox and a textbox, the highlighted item
remains highlighted when changing focus to the textbox. So I might guess
that this can be done with a listview.

Am I missing something or just out of luck?

Set the HideSelection property of the ListView to false to stop that
behaviour.

Hope this helps
Lloyd Sheen
Thanks. I really appreciate the reply. Based on the property name, I did
some research and found a sample code at
http://msdn2.microsoft.com/en-us/lib...on(VS.71).aspx

Unfortunately using the HideSelection property doesn't seem to work either
in my application or in the sample code.

All the words describing hideselection are right but false or true, the
result is the same. I tried both VB2008 Express and VB2005 Express.

Anyone able to make this work?
Dec 3 '07 #3

"Rich Raffenetti" <rich@raffenett i_takethisout.c omwrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
>
"Lloyd Sheen" <a@b.cwrote in message
news:ep******** ******@TK2MSFTN GP03.phx.gbl...
>>
"Rich Raffenetti" <rich@raffenett i_takethisout.c omwrote in message
news:uO******* *******@TK2MSFT NGP03.phx.gbl.. .
>>>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 need.

I am using VB2008 express. I see that the behavior of a similar program
in VB6 is the same.

When the controls are a listbox and a textbox, the highlighted item
remains highlighted when changing focus to the textbox. So I might
guess that this can be done with a listview.

Am I missing something or just out of luck?

Set the HideSelection property of the ListView to false to stop that
behaviour.

Hope this helps
Lloyd Sheen

Thanks. I really appreciate the reply. Based on the property name, I did
some research and found a sample code at
http://msdn2.microsoft.com/en-us/lib...on(VS.71).aspx

Unfortunately using the HideSelection property doesn't seem to work either
in my application or in the sample code.

All the words describing hideselection are right but false or true, the
result is the same. I tried both VB2008 Express and VB2005 Express.

Anyone able to make this work?
Reading further I find:

When this property is set to false, selected items in the ListView control
remain highlighted in a different color than the current selection color
specified by the operating system when the ListView control loses focus.

On my screen the "different color" is the same as unhighlighted. In the
display appearance settings I find "selected Items" but nothing suggesting a
different selected item color.

Any ideas?
Dec 3 '07 #4

"Rich Raffenetti" <rich@raffenett i_takethisout.c omwrote in message
news:eR******** ******@TK2MSFTN GP06.phx.gbl...
>
"Rich Raffenetti" <rich@raffenett i_takethisout.c omwrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
>>
"Lloyd Sheen" <a@b.cwrote in message
news:ep******* *******@TK2MSFT NGP03.phx.gbl.. .
>>>
"Rich Raffenetti" <rich@raffenett i_takethisout.c omwrote in message
news:uO****** ********@TK2MSF TNGP03.phx.gbl. ..
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 need.

I am using VB2008 express. I see that the behavior of a similar
program in VB6 is the same.

When the controls are a listbox and a textbox, the highlighted item
remains highlighted when changing focus to the textbox. So I might
guess that this can be done with a listview.

Am I missing something or just out of luck?
Set the HideSelection property of the ListView to false to stop that
behaviour.

Hope this helps
Lloyd Sheen

Thanks. I really appreciate the reply. Based on the property name, I
did some research and found a sample code at
http://msdn2.microsoft.com/en-us/lib...on(VS.71).aspx

Unfortunatel y using the HideSelection property doesn't seem to work
either in my application or in the sample code.

All the words describing hideselection are right but false or true, the
result is the same. I tried both VB2008 Express and VB2005 Express.

Anyone able to make this work?

Reading further I find:

When this property is set to false, selected items in the ListView control
remain highlighted in a different color than the current selection color
specified by the operating system when the ListView control loses focus.

On my screen the "different color" is the same as unhighlighted. In the
display appearance settings I find "selected Items" but nothing suggesting
a different selected item color.

Any ideas?
Are you using Vista and Aero? If so the difference is most likely hard to
see.

LS

Dec 3 '07 #5

"Lloyd Sheen" <a@b.cwrote in message
news:eU******** ******@TK2MSFTN GP06.phx.gbl...
>
"Rich Raffenetti" <rich@raffenett i_takethisout.c omwrote in message
news:eR******** ******@TK2MSFTN GP06.phx.gbl...
>>
"Rich Raffenetti" <rich@raffenett i_takethisout.c omwrote in message
news:%2******* *********@TK2MS FTNGP04.phx.gbl ...
>>>
"Lloyd Sheen" <a@b.cwrote in message
news:ep****** ********@TK2MSF TNGP03.phx.gbl. ..

"Rich Raffenetti" <rich@raffenett i_takethisout.c omwrote in message
news:uO***** *********@TK2MS FTNGP03.phx.gbl ...
>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 need.
>
I am using VB2008 express. I see that the behavior of a similar
program in VB6 is the same.
>
When the controls are a listbox and a textbox, the highlighted item
remains highlighted when changing focus to the textbox. So I might
guess that this can be done with a listview.
>
Am I missing something or just out of luck?
>

Set the HideSelection property of the ListView to false to stop that
behaviour.

Hope this helps
Lloyd Sheen

Thanks. I really appreciate the reply. Based on the property name, I
did some research and found a sample code at
http://msdn2.microsoft.com/en-us/lib...on(VS.71).aspx

Unfortunate ly using the HideSelection property doesn't seem to work
either in my application or in the sample code.

All the words describing hideselection are right but false or true, the
result is the same. I tried both VB2008 Express and VB2005 Express.

Anyone able to make this work?

Reading further I find:

When this property is set to false, selected items in the ListView
control remain highlighted in a different color than the current
selection color specified by the operating system when the ListView
control loses focus.

On my screen the "different color" is the same as unhighlighted. In the
display appearance settings I find "selected Items" but nothing
suggesting a different selected item color.

Any ideas?

Are you using Vista and Aero? If so the difference is most likely hard to
see.

LS
If there is a difference. I am using XP.
Dec 4 '07 #6

"Rich Raffenetti" <rich@raffenett i_takethisout.c omwrote in message
news:eL******** ******@TK2MSFTN GP03.phx.gbl...
>
"Lloyd Sheen" <a@b.cwrote in message
news:eU******** ******@TK2MSFTN GP06.phx.gbl...
>>
"Rich Raffenetti" <rich@raffenett i_takethisout.c omwrote in message
news:eR******* *******@TK2MSFT NGP06.phx.gbl.. .
>>>
"Rich Raffenetti" <rich@raffenett i_takethisout.c omwrote in message
news:%2****** **********@TK2M SFTNGP04.phx.gb l...

"Lloyd Sheen" <a@b.cwrote in message
news:ep***** *********@TK2MS FTNGP03.phx.gbl ...
>
"Rich Raffenetti" <rich@raffenett i_takethisout.c omwrote in message
news:uO**** **********@TK2M SFTNGP03.phx.gb l...
>>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
>>listvie w loses the highlight. That is not the behavior I need.
>>
>I am using VB2008 express. I see that the behavior of a similar
>program in VB6 is the same.
>>
>When the controls are a listbox and a textbox, the highlighted item
>remains highlighted when changing focus to the textbox. So I might
>guess that this can be done with a listview.
>>
>Am I missing something or just out of luck?
>>
>
Set the HideSelection property of the ListView to false to stop that
behaviour .
>
Hope this helps
Lloyd Sheen

Thanks. I really appreciate the reply. Based on the property name, I
did some research and found a sample code at
http://msdn2.microsoft.com/en-us/lib...on(VS.71).aspx

Unfortunatel y using the HideSelection property doesn't seem to work
either in my application or in the sample code.

All the words describing hideselection are right but false or true, the
result is the same. I tried both VB2008 Express and VB2005 Express.

Anyone able to make this work?
Reading further I find:

When this property is set to false, selected items in the ListView
control remain highlighted in a different color than the current
selection color specified by the operating system when the ListView
control loses focus.

On my screen the "different color" is the same as unhighlighted. In the
display appearance settings I find "selected Items" but nothing
suggesting a different selected item color.

Any ideas?

Are you using Vista and Aero? If so the difference is most likely hard
to see.

LS
If there is a difference. I am using XP.
There is a difference. The highlight is very light and is even invisible
unless I look at my LCD screen from an angle (not directly). So your advice
was right on. Only the result is not as good as might be expected. Thanks
again.
Dec 7 '07 #7

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

Similar topics

2
2105
by: Brian S | last post by:
I have a custom listView that works fine. There are items that are colored red to notify the user that there is a problem. However, if you select one of the red items, then select space below any of the other items, the red item turns back to default black. The only code getting called on this is a listView_Click event. If you select any other item, no matter what color, from the listView, the original one that was selected stays red. ...
1
1846
by: Giang Pham | last post by:
Dear all, When I add one row in my listview (type : details), I want to set it as selected. How could I do this ? Thank you a lot.
1
1146
by: JR Lyon | last post by:
Does anyone know how to select the highlighted item on a form. My problem is that I have a link label which is above a button. I want the button to highlight when I open the form but the link label always highlights instead. TIA JR
0
1284
by: Al Findlay | last post by:
Hello! I have a listview which has a column of images. The problem is, I want to be able to align the images to the centre of the column. By default, the images always align to the left. Can anyone help? Thanks,
3
12893
by: andreas.baus | last post by:
Hello. Is there a way to add custom code that is executed every time a ListViewItem is added to the Items collection of a ListView control? There does not seem to be an event that I could hook into, and I can't figure out how derive a custom ListViewItemCollection to override it's Add() Method...
4
1723
by: John | last post by:
any help would be appreciated Thanks
0
2465
by: alexia.bee | last post by:
Hi All, I am trying to get the index of an item that the mouse is pointing/ hovering at. Meaning, when user click the Combobox, droplist is show. When you hover the mouse on item, it highlight it. I want to get the item's index which the mouse is pointing at. The problem is that I didn't find any event that been fired when mouse highlightd/hover to other item in the drop downlist of the Combobox.
3
2402
by: Jon Slaughter | last post by:
How do I add the ability to combine listview with treeview? I want to have a list view but with some items in some columns to have the ability to act as a tree instead of just a single item. (like, say, how outlook express does it with its message headers) Is it possible with ListView? I haven't been able to find anything that mentions how to do it. Thanks, Jon
4
2624
by: rahulkawadgave | last post by:
Hi, I m working on viewing detials for a contact in windows mobile through my application. I am able to display the native contact details screen in my application. But i am not able to get the highlighted item from that screen. Please give a hint on this, how it can be done?
0
8375
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8290
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8707
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8482
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8593
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7306
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1593
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.