Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Lazarus Lazarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,108
    • Issues 2,108
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 9
    • Merge requests 9
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • LazarusLazarus
  • LazarusLazarus
  • Issues
  • #34370
Closed
Open
Issue created Oct 01, 2018 by FPC Admin account@fpc_adminOwner

FloatSpinEditEx truncating decimals

Original Reporter info from Mantis: wp @wpam
  • Reporter name:

Description:

If the value of pi (3.1415926563) is assigned to the Value of a TFloatSpinEditEx in the OnCreate event, the string "3.14" is displayed initially - which is correct because the default value of the DecimalPlaces is 2. But if the DecimalPlaces are incremented later only zeros are added to the 3.14.

On the other hand, when pi is assigned to the FloatSpinEditEx later when the form is fully created, the real digits are added to 3.14

Steps to reproduce:

The attached demo contains a TFloatSpinEditEx loaded with the value of pi.

The form contains also a TSpinEditEx which is used to change the number of DecimalPlaces of the FloatSpinEditEx, as well as a TButton.

1st test:
The OnCreate event of the form sets its value to pi -> when the form is completely created and shown the string "3.14" is displayed. When the DecimalPlaces are incremented the string becomes "3.140", "3.1400" etc.

2nd test:
Click on the button which sets pi to the FloatSpinEditEx.Value, too, but, of course, only when the form is fully created. Incrementing the DecimalPlaces now addes the correct digits to the "3.14" ("3.142", "3.1416", etc).

Mantis conversion info:

  • Mantis ID: 34370
  • Fixed in version: 2.0.1 (SVN)
  • Fixed in revision: r59332 (#5a23656f)
  • Target version: 2.0.1 (SVN)
  • LazTarget: 2.0
Assignee
Assign to
Time tracking