Why doesn't listview item stay highlighted when it looses focus?

M

Max Moor

Hi All,

The subject line nearly says it all. I have a listview on a main form
with a subform that shows details of the selected item. When I click and
item in the list view, the whole row highlights, but as soon as I move the
focus to the subform, it goes away.

I can set the color of the row myself in code, but I wonder if theres
an easier way?

Regards,
Max
 
M

Max Moor

Hi All,

The subject line nearly says it all. I have a listview on a
main form
with a subform that shows details of the selected item. When I click
and item in the list view, the whole row highlights, but as soon as I
move the focus to the subform, it goes away.

I can set the color of the row myself in code, but I wonder if
theres
an easier way?

Regards,
Max

Eureka! I found a property! The HideSelection property defaults to True,
unhighlighting the selected item when the control looses the focus. Set it
false, and the item stays highlighted. Funny, I only looked at the list of
properties 100 times before I saw it. Sigh

- Max
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top