I'm trying to delselect all the items in a listbox but leave the current
item in view with focus (but not selected).....
I tried the folowing code:
LOCAL nLoop, nItem, oList
oList = ThisForm.List1
ThisForm.LockScreen = .t.
nItem = oList.ListIndex
FOR nLoop = 1 TO oList.ListCount
oList.Selected(nLoop) = .f.
NEXT nLoop
oList.ListIndex = nItem && Go back to original item
ThisForm.LockScreen = .f.
It seems that setting the .listindex back to the original item ALSO
'selects' it (i.e. highlights it in blue) which defeats the object. If I
don't use listindex then the item with focus is the last one in the list.
I wondered if anyone had any ideas