Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TextBox not selected on entry
Message
De
27/07/2001 14:44:00
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00535697
Message ID:
00536590
Vues:
9
Fabio-

>Now you touched in a subject I was investigating some time ago and I thought it was some imagination of my mind <s>.
>The case is exactly this! My value on the ControlSource and Value properties are 0.000, however if I "browse" the table, the corresponding field is blank (not NULL!). In order to solve my problem, I could do the following:
>
>1) In the WHEN method of the textBox:
>
>IF EMPTY(THIS.Value)
>  REPLACE MyTable.MyField WITH 0.0000 IN MyTable
>ENDIF
>
>This solution may take too much effort to implement in my application...
>
>2) When I APPEND BLANK the new record:
>
>SELECT MyTable
>APPEND BLANK
>SCATTER MEMVAR MEMO
>GATHER MEMVAR MEMO    && This action puts the zeroes into the numeric fields
>
>This Solution may take less time to implement, but it's undesirable yet.
>

Yes, it's undesirable. In my number textbox base class GotFocus(), I do:

THIS.SELSTART = 0
THIS.SELLENGTH = LEN(TRIM(TRANSFORM(THIS.VALUE)))
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform