>>>>>>>>hello everybody.
>>>>>>>>
>>>>>>>>ok, here's one i havn't noticed before: i have a dbf with a double field (8,8). on the form i have a textbox (i used the basic textbox from VFP to eliminate any errors in the code of my txtbox class). this txtBox does not contain any code or any specs in the format and imputMask property.
>>>>>>>>
>>>>>>>B(8,8) or N(8,8) ? both are wrong
>>>>>>>
>>>>>>><snip>
>>>>>>
>>>>>>
>>>>>>- well, on the double type field (not "B" as you stated) you only specify the "nPrecision" with i set at 8, the "nFieldWidth" is showing 8.
>>>>>>
>>>>>>- the numeric field - you are correct - was 8,7 not 8,8
>>>>>
>>>>>Gunnar, want you a data or a display precision ?
>>>>>
>>>>>clear
>>>>>CREATE CURSOR myCursor (myField B(8))
>>>>>APPEND BLANK
>>>>>REPLACE myField WITH 0.123456781
>>>>>? "myField =",myField
>>>>>? "myField =0.12345678" ,myField =0.12345678
>>>>>? "myField =0.123456781" ,myField =0.123456781
>>>>>
>>>>
>>>>hello Fabio
>>>>
>>>>the problem is not the table (field) itself, but the capability to enter a absolute (like 12345678.00000000) into the textbox, it doesn't let me do it.
>>>>
>>>>to replace myfield with 12345678.00000000 - works just fine. my problem is a GUI problem.
>>>
>>>First, 16 digits go out of double precision,
>>>hovewer,
>>> i'm able to put 12345678.00000000 into a textbox binded to a double data field.
>>
>>
>>ok try this (in VFP 6), enter a value of 12345678.0 - what you'll get/see is 123.45678 :
>>MyForm = CREATEOBJECT("MyForm")
>>MyForm.VISIBLE = .T.
>>
>>READ EVENTS
>>
>>MyForm = .null.
>>
>>
>>* ***
>>DEFINE CLASS MyForm AS FORM
>> AUTOCENTER = .T.
>> HEIGHT = 200
>> WIDTH = 200
>>
>> ADD OBJECT MyTextBox AS TEXTBOX WITH ;
>> TOP = 20, ;
>> LEFT = 20, ;
>> WIDTH = 100, ;
>> SELECTONENTRY = .T., ;
>> enabled = .t., ;
>> readonly = .f., ;
>> CONTROLSOURCE = "MyCursor.MyField"
>>
>> PROCEDURE LOAD
>> CREATE CURSOR MyCursor (MyField B(8))
>> append blank
>> ENDPROC
>>
>> PROCEDURE DESTROY
>> USE IN MyCursor
>> CLEAR EVENTS
>> ENDPROC
>>
>>ENDDEFINE
>
>With numeric value,it does not wish to hide some digits, this is a correct design;
>then VFP compute the value's max digits with textbox.width/fontName/fontsize....
>You have two solutions:
>- increase the width/fontsize ratio ( correct choice )
>- set a specific InputMask ( bad choice )
funny thing is, that with character this design behaivior is different. anyway, i don't have the space to widen those fields , to allow all the digits to show.
also i don't need to show all the digits, because , as i have stated before, the user will enter either a number like 123456.0 or 0.123456 but not 123456.123456. therfore i actually don't wanna show anything other then the number entered. the txtbox shows 12345678.00000000 - this i don't need (wast of space) all i need to show is 1234567.0