Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listbox highlighting current record when starting?
Message
 
À
28/10/1999 18:46:57
Peter Brama
West Pointe Enterprises
Detroit, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00283479
Message ID:
00283702
Vues:
10
Hi,

To get the list item highlighted, do a SetFocus to your list box from
the form Init method. This will highlight the item in the list so you
might need to move your ListIndex property also.

Maybe you need to use the DisplayValue of the list box to get the
right value, but I don't know if the type would be the same since
I haven't had a list of dates yet.

HTH

>This is probably a simple questions with a simple answer BUT.....
>
>I have a very simple form with a single list box, an OK and a CANCEL button. The list box is two column both from the same file. Column 1 is a date, column two is text. The table is listed in the DE and the ORDER is set to the DATE index.
>
>When the form inits, the listbox is correctly filled, etc. I pass to the form a parameter that holds the current entered date. (in a date type field). I would like the current entered date to be highlighted in the list box. HOW?
>
>I also noticed, when I highlight a date and hit the OK, the BOUND field of the listbox (column 1) causes the VALUE of the listbox to be filled with the date from the table (in text-not date type). I suppose I could pass that back to the calling form. Is that the best way? If so, I assume I can use a CTOD to convert it back to date format?
>
>Thanks
Speak using soft and sweet words in case you have to eat them later.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform