Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox Questions
Message
 
À
10/11/2007 03:58:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01267056
Message ID:
01268560
Vues:
23
Fabio:
My solutions seem to be working fine. Both of them involved creating a RowSource_Assign method and putting code in it. Here is what my code now looks like:

LPARAMETERS vNewVal

*Notejk: To make sure that m.vNewVal is Table.Field
IF !"."$m.vNewVal.AND.!"->"$m.vNewVal.AND.!EMPTY(m.vNewVal)
m.vNewVal = ALLTRIM(m.vNewVal) + "." + ALLTRIM(FIELD(1, m.vNewVal))
ENDIF

THIS.RowSource = m.vNewVal &&Notejk: So the ListCount works in the next line

IF This.ListCount < This.ListIndex &&Notejk: To make sure that they don't go out of sync
This.ListIndex = 1
ENDIF
This.Enabled = (This.ListCount > 1) &&Notejk: To solve problem 1

*Notejk: To prevent infinite loop and avoid changing empty RowSource
IF !"STRTR"$This.RowSource.and.!EMPTY(This.RowSource)
This.RowSource = "STRTRAN(" + m.vNewVal + ", '|')" &&Notejk: To solve problem 2
ENDIF

Jerry Kahn
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform