Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What do you think of this picklist idea?
Message
 
À
13/07/1998 14:31:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00116853
Message ID:
00116891
Vues:
18
>>You can set the rowsourcetype to None and put this code in the requery of the combo;
>>
>>
>>* Combo classes requery
>>LOCAL lcAlias, lcOrder, lnNewItem
>>lcAlias = ALIAS()
>>SELECT <TheAlias for the combo>
>>lcOrder = SET("ORDER")
>>SET ORDER TO <the tag you want>
>>GO TOP
>>WITH THIS
>>   .Clear()
>>   lnNewItem = .NewItemId + 1
>>   .AddListItem("<NEW>",lnNewItem)
>>   SCAN
>>      lnNewItem = .NewItemId + 1
>>      .AddListItem(TabelFieldName,lnNewItem)
>>   ENDSCAN
>>ENDWITH
>>
>>
>>The add a call to the Requery in the Init to the combo is initially filled. Anytime you want to refresh the list of options in the combo call its requery method.
>
>I haven't tried this because my help file says that .AddListItem and .AddItem only work when .RowSourceType=0. I don't want to build the list, I want to use .RowSourceType=3 or 6.

Bill,

Every time I have encountered any problem doing what I want with a list or combo, I have use rowsourcetype 0 and done the above code. I have not encountered any performance problems with this approach and I have gained complete control over the list contents. I goen to using this appraoch as my default approach now and only revert to other rowsourcetypes when there is an overriding reason to dos so.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform