Link to home
Start Free TrialLog in
Avatar of sidwelle
sidwelleFlag for United States of America

asked on

lock listview

I need to be able to lock a ListView control.   In my app I want the user to be able to select an item from the ListView control.  When this happens a series of controls will populate with the properties of that item.  The user will have the option to edit those properties, but I don't want the user to be able to manipulate the ListView while editing is taking place.

If I disable the ListView,  the selection is lost.  Can't see which item is currently being edited and when you re-enable the ListView the selection is lost.

Any help ?
Avatar of Antagony1960
Antagony1960

If you set the ListView's "HideSelection" property to False the selected row will remain highlighted while the control is disabled.
Avatar of sidwelle

ASKER

That was simple enough.  Is there any way to change the colors so that you get the same colors if the control has focus or not ?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Antagony1960
Antagony1960

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I didn't think it was going to be that simple. Thanks for the code. I do have an example that I worked out changing the background color via sub-classing.  Send me an Email if you want the code.
Glad to have helped. :-)