Frederick Posted March 10, 2021 Share Posted March 10, 2021 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.mp4 editnotext.7z Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 10, 2021 Share Posted March 10, 2021 1 hour ago, Frederick said: editnotext.7z 6.27 MB · 1 download Please include also the main modules. Quote Link to comment Share on other sites More sharing options...
Frederick Posted March 10, 2021 Author Share Posted March 10, 2021 Please find the updated testcase file attached. editnotext2.7z Quote Link to comment Share on other sites More sharing options...
Frederick Posted March 15, 2021 Author Share Posted March 15, 2021 Hi Sherzod, May I know if the testcase files are complete and is this a bug? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 15, 2021 Share Posted March 15, 2021 Just now, Frederick said: May I know if the testcase files are complete and is this a bug? Hi, We will recheck your test case and let you know. Quote Link to comment Share on other sites More sharing options...
Frederick Posted March 15, 2021 Author Share Posted March 15, 2021 Thanks Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 15, 2021 Share Posted March 15, 2021 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; ?? Quote Link to comment Share on other sites More sharing options...
Frederick Posted March 15, 2021 Author Share Posted March 15, 2021 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'. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.