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 2016-11-18 18:10
Reporter acgubamg View Status public  
Assigned To
Priority normal Resolution open  
Status new   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

There are no notes attached to this issue.

- 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


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