Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Collecting field number in listbox
Message
De
23/03/2001 04:27:47
 
 
À
22/03/2001 16:46:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00487790
Message ID:
00487926
Vues:
10
>i use a listbox to display the fieldnames of a table and another listbox to capture the multi-selected fieldnames. its pem are:-
>
>init code is:-
>sele acctemp
>nLastField=fcount()
>for ctr=1 to nLastField
> vfield=field(ctr)
> this.additem(vfield)
>endfor
>
>interchange code is:-
>FOR i = 1 TO THIS.ListCount
> IF THIS.Selected(i)
> nNoSel = nNoSel + 1
> THISFORM.List2.Additem (THIS.List(i))
> ENDIF
>ENDFOR
>
>it works well and box2 capture all selected items. when i want to capture the field selected listindex numbers, i substitute line 4 of the interchange code to "thisform.List2.additem(str(this.listindex,2,0))". it does not produce the result that i want as the last selected listindex number replaces all existing selections. please help. ta



just a wrong function call.

Check out the usage of AddListItem Event, and the sample will do what you need.
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform