By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,288 Members | 1,116 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,288 IT Pros & Developers. It's quick & easy.

listview loses highlighted item

P: n/a
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
Share this Question
Share on Google+
6 Replies

P: n/a

"Rich Raffenetti" <rich@raffenetti_takethisout.comwrote in message
news:uO**************@TK2MSFTNGP03.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

P: n/a

"Lloyd Sheen" <a@b.cwrote in message
news:ep**************@TK2MSFTNGP03.phx.gbl...
>
"Rich Raffenetti" <rich@raffenetti_takethisout.comwrote in message
news:uO**************@TK2MSFTNGP03.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

P: n/a

"Rich Raffenetti" <rich@raffenetti_takethisout.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>
"Lloyd Sheen" <a@b.cwrote in message
news:ep**************@TK2MSFTNGP03.phx.gbl...
>>
"Rich Raffenetti" <rich@raffenetti_takethisout.comwrote in message
news:uO**************@TK2MSFTNGP03.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

P: n/a

"Rich Raffenetti" <rich@raffenetti_takethisout.comwrote in message
news:eR**************@TK2MSFTNGP06.phx.gbl...
>
"Rich Raffenetti" <rich@raffenetti_takethisout.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>>
"Lloyd Sheen" <a@b.cwrote in message
news:ep**************@TK2MSFTNGP03.phx.gbl...
>>>
"Rich Raffenetti" <rich@raffenetti_takethisout.comwrote in message
news:uO**************@TK2MSFTNGP03.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?
Are you using Vista and Aero? If so the difference is most likely hard to
see.

LS

Dec 3 '07 #5

P: n/a

"Lloyd Sheen" <a@b.cwrote in message
news:eU**************@TK2MSFTNGP06.phx.gbl...
>
"Rich Raffenetti" <rich@raffenetti_takethisout.comwrote in message
news:eR**************@TK2MSFTNGP06.phx.gbl...
>>
"Rich Raffenetti" <rich@raffenetti_takethisout.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>>>
"Lloyd Sheen" <a@b.cwrote in message
news:ep**************@TK2MSFTNGP03.phx.gbl...

"Rich Raffenetti" <rich@raffenetti_takethisout.comwrote in message
news:uO**************@TK2MSFTNGP03.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?

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

P: n/a

"Rich Raffenetti" <rich@raffenetti_takethisout.comwrote in message
news:eL**************@TK2MSFTNGP03.phx.gbl...
>
"Lloyd Sheen" <a@b.cwrote in message
news:eU**************@TK2MSFTNGP06.phx.gbl...
>>
"Rich Raffenetti" <rich@raffenetti_takethisout.comwrote in message
news:eR**************@TK2MSFTNGP06.phx.gbl...
>>>
"Rich Raffenetti" <rich@raffenetti_takethisout.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl.. .

"Lloyd Sheen" <a@b.cwrote in message
news:ep**************@TK2MSFTNGP03.phx.gbl...
>
"Rich Raffenetti" <rich@raffenetti_takethisout.comwrote in message
news:uO**************@TK2MSFTNGP03.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?

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 discussion thread is closed

Replies have been disabled for this discussion.