Project JEDI - Issue Tracker - JEDI VCL
Viewing Issue Advanced Details
5841 00 JVCL Components minor always 2012-03-23 03:48 2013-12-13 11:22
acgubamg XE2  
obones Windows  
normal 7 SP1  
resolved Daily / GIT  
last svn suspended  
none    
none  
0005841: TJvCalcEdit.Text
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;

a funcao acima alterada, quando FDecimalPlaces = 0 sempre mostra o text como
6.102, se digito 6102 e em seguida mostro o valor de jvcalcedit1.text mostra como '6.102' e não como '6102'

Não poderia ser alterado para o código:

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;

Dessa forma se FDecimalPlaces for maior que zero, mostra o separador, caso contrário, permanece o número como inteiro. E ao utilizar o jvcalcedit1.text como inteiro, retorna apenas números.
Issue History
2012-03-23 03:48 acgubamg New Issue
2012-03-23 03:52 acgubamg Note Added: 0019681
2012-03-23 03:58 acgubamg Issue Monitored: acgubamg
2012-06-11 17:24 obones Note Added: 0019843
2012-06-11 17:24 obones Status new => feedback
2013-12-13 11:22 obones Note Added: 0020768
2013-12-13 11:22 obones Status feedback => resolved
2013-12-13 11:22 obones Resolution open => suspended
2013-12-13 11:22 obones Assigned To => obones

Notes
(0019681)
acgubamg   
2012-03-23 03:52   
google translation:

the above function changed when FDecimalPlaces = 0 always shows the text as
"6.102", if I type 6102 and then show the value of '6.102' jvcalcedit1.text shows how and not '6102'

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.
(0019843)
obones   
2012-06-11 17:24   
Please provide the zipped sources of a sample application showing this.
(0020768)
obones   
2013-12-13 11:22   
No news, suspending the issue