Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TextBox not selected on entry
Message
From
27/07/2001 14:44:00
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00535697
Message ID:
00536590
Views:
8
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)))
Previous
Reply
Map
View

Click here to load this message in the networking platform