View Issue Details

IDProjectCategoryView StatusLast Update
0005841JEDI VCL00 JVCL Componentspublic2013-12-13 11:22
ReporteracgubamgAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionsuspended 
PlatformXE2OSWindowsOS Version7 SP1
Product VersionDaily / GIT 
Target VersionFixed in Version 
Summary0005841: TJvCalcEdit.Text
Descriptionfunction 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.
TagsNo tags attached.

Activities

acgubamg

2012-03-23 03:52

reporter   ~0019681

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.

obones

2012-06-11 17:24

administrator   ~0019843

Please provide the zipped sources of a sample application showing this.

obones

2013-12-13 11:22

administrator   ~0020768

No news, suspending the issue

Issue History

Date Modified Username Field Change
2012-03-23 03:48 acgubamg New Issue
2012-03-23 03:52 acgubamg Note Added: 0019681
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