|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Problem with ROUNDING a number
Hi folks,
I donīt why, but if i type in a TEdit object, for example, the number 1,223344, when i exit from that TEdit object and go to the other (by pressing TAB or ENTER), that number is automatically converted to 1,223300... I see that Delphi is rounding that number, but i donīt need it... I want the whole number (infinit number). I just donīt want that the program ROUND that... Is there anyway to do that number (1,223344) appears like 1,2233 but, internally, in the program memo, is saved like 1,223344? Thx. for now. |
|
#2
|
|||
|
|||
|
I took some screenshots to clear my question.
This is my program: (see the screenshot - URL). As you can see, there is 2 TEdit objetcs, 1 button and 1 panel. I want to type, for example, the number 1,223344 in the first TEdit object (see screenshot - URL). Ok, i typed this, but see what happens when i exit from that TEdit and go to other (see screenshot - URL). Did you see that it automatically converts that number (1,223344) to 1,223300... In other words, DELPHI is rounding my number and donīt like it... Iīd like to know a way to just show 1,2233 but the program RECORDS 1,223344 (and not 1,223300 as it does). I hope that it help a little... ![]() |
|
#3
|
||||
|
||||
|
TEdit doesn't change anything entered into it, unless you explicitly change it yourself (either by typing or by code). I'm guessing you have an OnExit() or OnChange() handler there that edits it for you.
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by Keath and KevinADC, superior perl programmers of the month |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Delphi Programming > Problem with ROUNDING a number |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|