listview DE- Selecting items

Started by paulDiagnos, January 18, 2005, 01:59:05 PM

Previous topic - Next topic

paulDiagnos

Hi,

how can i de- select an item from a listview ( once something is selected )

I have tried a few things and i know this should be simple
but its giving me gip

thanks PAul

Roger Garstang

Send the LV a %LVM_SETITEMSTATE message setting the LV_ITEM you pass to it as:

.stateMask = %LVIS_SELECTED

and .State = 0 as opposed to %LVIS_SELECTED to select them.

paulDiagnos

should this de-select the list view item including the greyed out area?

as i can delecte3d it fine with your code but the grey out area remains. this is what i need to get rid of ta
paul

Roger Garstang

There are two things in a Listview, one is Focus with Dotted border which is only one item, the other is Selected with the whole line or first item having a colored background.  My code removes Selected.