Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006534 [JEDI VCL] 00 JVCL Components major always 2016-11-18 18:10 2019-04-30 16:08
Reporter acgubamg View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version Daily / GIT
Summary 0006534: DecimalPlaces, DecimalPlacesAlwaysShown
Description The function below:

function TJvCustomNumEdit.GetEditFormat:String;
begin
  Result := ',0'; // must put the thousands separator by default to allow direct edit of value (paste for example)
  if FDecimalPlaces > 0 then
    if FDecimalPlacesAlwaysShown then
       Result := Result + '.' + MakeStr('0', FDecimalPlaces)
    else
       Result := Result + '.' + MakeStr('#', FDecimalPlaces);
end;


There could be changed to the code:
function TJvCustomNumEdit.GetEditFormat:String;
begin
  if FDecimalPlaces = 0 then
    Result := '0'
  else
  begin
    Result := ',0';
    if FDecimalPlacesAlwaysShown then
       Result := Result + '.' + MakeStr('0', FDecimalPlaces)
    else
       Result := Result + '.' + MakeStr('#', FDecimalPlaces);
  end;
end;

Thus if FDecimalPlaces is greater than zero, the separator shown, otherwise, it remains as an integer number. And when using the jvcalcedit1.text as integer, returns only numbers.



Additional Information
Tags No tags attached.
Attached Files png file icon erro.png [^] (11,365 bytes) 2016-11-18 18:10

- Relationships

-  Notes
(0021510)
obones (administrator)
2018-07-18 15:49

Could you check if the issue is still present in the latest GIT content? If yes, please provide the zipped sources of an application showing this.
(0021767)
mh (reporter)
2019-04-27 14:53

Created this pull request containing the above proposed fix:
https://github.com/project-jedi/jvcl/pull/103 [^]

- Issue History
Date Modified Username Field Change
2016-11-18 18:10 acgubamg New Issue
2016-11-18 18:10 acgubamg File Added: erro.png
2016-12-06 13:59 acgubamg Issue Monitored: acgubamg
2018-07-18 15:49 obones Note Added: 0021510
2018-07-18 15:49 obones Status new => feedback
2019-04-27 14:53 mh Note Added: 0021767
2019-04-30 16:08 obones Status feedback => resolved
2019-04-30 16:08 obones Fixed in Version => Daily / GIT
2019-04-30 16:08 obones Resolution open => fixed
2019-04-30 16:08 obones Assigned To => obones


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker