Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ListBox Selected property doesn't work.
Message
 
To
01/04/1997 02:45:37
General information
Forum:
Visual FoxPro
Category:
User groups
Miscellaneous
Thread ID:
00026360
Message ID:
00026373
Views:
28
>ColumnCount=4
>MultiSelect=.T.
>RowSource=Fname1,fname2,fname3,fname4
>RowsourceTypw=6 - Fields
>
>User are allow to do multiple select in order to print their PO. Here are the code snippet in the THISFORM.cmdPrint.Click() :-
>
>*****
>FOR lnRow = 1 to THISFORM.lstPO.ListCount
> if THISFORM.lstPO.Selected(lnRow)
> y=y+1
> if y > alen(laPOList,1)
> DIMENSION laPOList[y,3]
> endif
> WITH THISFORM.lstPO
> laPOList[y,1]=.List(lnRow,2) && POno
> laPOList[y,2]=.List(lnRow,4) && POStatus
> laPOLIst[y,3]=.List(lnRow,1) && DateRecv
> ENDWITH
> THISFORM.lstPO.Selected(lnRow)=.f.
> endif
>EndFor
>******
>
>The problem is the selected property doesn't work sometime. I meant it didn't return True when the row is selected. There are 3 symptoms :-
>
>1) When multiple selection using [Ctrl] or [Shift], none of the selected property return True.
>
>2) Only the first selected row return True even it's multiple selection.
>
>3) none of the selected property return True even single selection.
>

Yes, the #1 mulitselect is a bug in vfp3. The workarounds are, as far as I know, 1) get vfp5 2) use additem to populate. See an MS KB doc more info...#2 is maybe the same problem. #3 should at least get you in the outer if...did you try just putting a wait window to check it?
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Reply
Map
View

Click here to load this message in the networking platform