Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form Class having ListBox but init. selection wont Highl
Message
De
02/12/2004 05:57:20
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
00966268
Message ID:
00966309
Vues:
8
This message has been marked as a message which has helped to the initial question of the thread.
>Hi Cetin
>
>>myListbox.listindex = 1
>
>ListIndex was not available at design-time so I set it up in myListBox.Init() and it worked. Thanks a lot. Also this listbox does not really have a control source, is it necessary? It is working anyway.
>
>While we are at it, also the next time round when this form is opened the index reverts to the first record anyway I can get it to stay the next time round in the last selected record. I have stored the iID of the record in the form for current usage and then later stored in the goApp application object. Anyway to make it remember the selection?
>
>Please advise.

No doesn't need any controlsource.
You could set it in form.init. If rowsourcetype is something that's a cursor (fields,SQL,quer,alias) then as you move in listbox you're moving the pointer in listbox (listindex = 1, recno() of underlying cursor is 1)

I generally use RowSourceType=3 - SQL. As I move in its cursor I simply set:

myListBox.ListIndex = recno('cursorName')

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform