Hello all. I have a legacy app that is resetting the selected listbox row to 1 by default. This is a multiselect list box. Under certain conditions, I am trying to re-establish the multiselect state the list was in. Here's how I'm trying:
* first the selected elements are copied to an array.
list1.multiselect = .T.
FOR i = 1 TO list1.listcount
IF ASCAN(laArray, list1.list(i)) > 0
list1.selected(i) = .T.
ENDIF
ENDFOR
What I end up with is the last item from the array being selected, and I lose all the other selections. In debug mode, I can see the selections traversing the list in order.
Any/all ideas much appreciated!
TIA,
Dan Dan Walter
DWalter@zoo.uvm.edu
* first the selected elements are copied to an array.
list1.multiselect = .T.
FOR i = 1 TO list1.listcount
IF ASCAN(laArray, list1.list(i)) > 0
list1.selected(i) = .T.
ENDIF
ENDFOR
What I end up with is the last item from the array being selected, and I lose all the other selections. In debug mode, I can see the selections traversing the list in order.
Any/all ideas much appreciated!
TIA,
Dan Dan Walter
DWalter@zoo.uvm.edu