Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
List box problem...
Message
De
27/08/2002 22:02:13
 
 
À
26/08/2002 17:15:03
Irv Adams
MSC Managed Care, Inc.
Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00693827
Message ID:
00694306
Vues:
15
>Hi Bob:
>
>Good code snippet, very concise...
>
>Refer to this reference in your code:
>
>ALLTRIM(oObj.ListItem[i,2])
>

>
>I think the above is only a 1-dimensional array, such as
>
Nope, since I have a second column on each row, the above is correct.

I found the problem today. Well, I didn't find the problem, but I got it to work when I switched the rowsource to 0 (none). I had to load the lists by scanning each cursor. Once I made that change, the code below worked without any modifications.

Thanks to those who helped!

BOb

>>Hi All,
>>
>>I am trying to store and then restore the selections in a multi-select list box. I have the code to store the selections working fine. Basically, I stored an underscore delimited string of the 'key' values. Now, I want to take this string and restore the multi-selections, but only the last item I set to selected is selected.
>>
>>Here is my code:
>>
>>
>>LPARAMETERS cObjName, cSelected
>>
>>LOCAL oObj AS ListBox, i
>>
>>oObj = EVALUATE("This."+cObjName)
>>
>>FOR i = 1 TO oObj.ListCount
>>	IF ALLTRIM(oObj.ListItem[i,2]) $ cSelected
>>		oObj.SelectedID[i] = .T.
>>	ENDIF
>>ENDFOR
>>
>>RETURN
>>
>>
>>Any help would be apreciated.
>>
>>BOb
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform