Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » New options in double formatting
New options in double formatting [message #34318] Fri, 11 November 2011 15:10 Go to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
I have found it is quite difficult to force EditDouble to use ',' instead of '.' for decimal point, that lead to a chain of minor improvements...

First of all, Format now recognized ',' and '@' n/ne/nf/nl/v/ve/vf/vl formatting, first one forces decimal point to be displayed as ',', second one supresses thousands separators in i18n formatting (that is not exactly solving the original problem, but might be quite necessary sometimes too_:

Format("%n", 1234567.89) = 1234567.89
Format("%,n", 1234567.89) = 1234567,89
Format("%nl", 1234567.89) = 1,234,567.89
Format("%@nl", 1234567.89) = 1234567.89
Format("%@,nl", 1234567.89) = 1234567,89


Next, ConvertDouble::Pattern now performs "scan for decimal point" - it does Format(1.1) and then scans for ',' in result - if it detects one, it then forces Filter to force ',' as decimal point.

After these changes, forcing EditDouble to use ',' is just matter of calling Pattern("%,n")...
 
Read Message
Read Message
Read Message
Previous Topic: FindFile::GetPath
Next Topic: SqlCtrls - 'automatic' mode and reference example
Goto Forum:
  


Current Time: Tue May 14 03:40:48 CEST 2024

Total time taken to generate the page: 0.02172 seconds