Jump to content

TUniDBFormattedNumberEdit's Text Property Is Blank If Underlying Table Is Assigned -1.00


Frederick

Recommended Posts

I have a TUniDBFormattedNumberEdit that is bound to an SQLite table. When I exit the control and I detect that the text property is blank, I assign a default value.

For some reason, when I assign any number other than -1.00, the text property shows the value assigned. If I assign -1.00, the text property remains blank.

Is this a bug and how do I work around it?

A video showing the problem and a testcase is attached.

--
Frederick
(UniGUI Complete - Professional Edition 1.90.0.1546)
 

editnotext.7z

Link to comment
Share on other sites

1 hour ago, Frederick said:

May I know if the testcase files are complete and is this a bug?

procedure TMainForm.edtAmtExit(Sender: TObject);
var
   cField, cValue : String;
begin
   cField:=TUniDBEdit(Sender).Name;
   cValue:=TUniDBEdit(Sender).Text;
   if cField='edtAmt' then begin
      if cValue='' then
         cmdSet.Click;
     end
   else begin
      if cValue='' then
         cmdSet11.Click;
   end;
end;

??

Link to comment
Share on other sites

The above code is to test if the TUniDBFormattedNumberEdit control (edtAmt) is blank. If yes, call cmdSet to set a default value of -1.00. As a comparison, the other TUniDBFormattedNumberEdit control is set to -11.00 when left blank.

This shows that if I assign a value of -1.00 to the control, the Text property remains blank instead of '-1.00'.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...