Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How determine entered value type
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00383408
Message ID:
00383615
Vues:
14
Hi Nadya,

If the combo is determining what type the textbox should be, then initialize the textbox value in the combo's InteractiveChange:
Do case
  Case cbotype.value = 'Character'
    ThisForm.txtMyText.Value = ''
  Case cbotype.value = 'Numeric'
    ThisForm.txtMyText.Value = 0
  Case cbotype.value = 'Date'
    ThisForm.txtMyText.Value = {}
  Case cbotype.value = 'Logical'
    ThisForm.txtMyText.Value = .t.
EndCase
>2) The second idea is not put textbox at all on the form, instead create several classes (or borrow it from here Files section) like txtNumbers, txtDate, txtDateTime, etc. and then add object in run-time depending on which field type was selected from the combobox to replace.
>
> What do you think?
>
>>Nadya,
kenweber
GCom2 Solutions
Microsoft Certified Professional

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform