Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
List Box - select via code
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00291709
Message ID:
00291730
Vues:
23
>The following code is in a forms init method. The correct row is outlined in the listbox, but is is not highlighted as when clicked. I've tried "thisform.lstC.setfocus()" and "thisform.lstC.click()" but neither attempt hightlights the row in question. Please clue me in.
>
>
>lparameter lc_record_id
>for lnx = 1 to thisform.lstC.ListCount
> if thisform.lstC.list(lnx,2) = lc_record_id
> thisform.lstC.Selected(lnx) = .t.
> thisform.lstC.value = thisform.lstC.list(lnx,2)
> exit
> endif
>endfor

Robert, try
thisform.lstC.ListIndex = lnx

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform