Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to update highlighted item in ListBox
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00033851
Message ID:
00034222
Vues:
40
>>>>>I have a data entry form with a 2 page pageframe on it. Page 1 contains all the objects for data entry and page 2 contains a listbox for navigation. The listbox's RowSourceType is Fields. When I choose a selection in the listbox the record pointer changes and I refresh page 1. This is fine. If the user steps through records on page 1 and then selects page 2 the choice highlighted is the last one selected. How do I make it highlight the choice for the current record? >>>> >>>>Reset List.Selected() property in Page2.Activate event. >>> >>>Thanks Edward. This solves the problem of what to do but brings up another. Page1 has the index on Catagory#+Subcategory# and page2 has the index on Lastname+Firstname. How do I determine what the index number for the .Selected() property should be when the user Activate's page2? >> >>You can SET ORDER explicitly in the same Activate event. > >What I meant was, to use the .Selected property I have to know what line (indexID) of the listbox to select (hilite). > >syntax -- Control.Selected(nIndex)=.T. > >How do I figure out what the value of nIndex should be? You may have to do "FOR nItem = 1 TO ....List.ListCount" loop and locate the item that should be highlighted. I do this regularly by hiding in the list box a unique key value that can be used for identifying the item required or at least positioning close to a recently deleted item. Rgds Petras
Petras Virzintas
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform