There is a DataSet , with a β€œ Double Precision ” type β€œ Number ” field with an attached DBEdit , before inserting a value into this field, another β€œ Main ” field is filled in and a calculation is made which can result in a negative number.
Based on a negative value, I need to score one β€œ-” in the β€œ Number ” field.

I cannot insert the β€œ-” sign into the DataSet , so I have to use DBEdit and score β€œ-” there, but when I use the Tab button or the mouse, I switch to the Number field (to score a value) the β€œ-” sign is killed. I would like the β€œ-” sign to remain after I have entered the field with the cursor in order to score only the value (as a result, the value will be negative).

You can of course use the normal Edit , and after entering the value in Edit, transfer the negative value to the " Number " field, but somehow it does not look good.

  • There is no such number "-". - Kromster
  • Well then, I will stop on additional Edit , i.e. I will put it on top of dbEdit . And when in Edit , after "-" I will enter numbers, I will transfer everything to dbEdit (the " OnChange " event) - Konstantin78

0