In VCL the command below works perfectly returning +5.00
procedure TForm4.DBEdit1Exit (Sender: TObject);
begin
DBEdit1.Text: = FormatFloat ('+ 0.00; -0.00', 5);
ShowMessage (DBEdit1.Text);
end;
If I try the same on Unigui it always returns the value of 5! would this be some kind of bug? I looked at the source code and realized it has a validation below!
procedure TUniBaseEdit.SetText (AValue: TCaption);
begin
if IsNumberEdit then
begin
AValue: = Trim (AValue);
CheckBlank (AValue);
if FIsBlankValue then
begin
FChanged: = True;
if FValue <> -1 then
begin
FValue: = -1;
DoOnChangeValue;
end;
SetVCLProperty ('Text', '');
end
else
Self.Value: = StrToFloat (AValue, FmtSettings);
end
else
begin
AValue: = AdjustCase (AValue);
if AValue <> InternalText then
begin
inherited SetText (AValue);
FChanged: = True;
end;
end;
end;
Can not he respect what happens in the VCL?
Thanks
Zanona