Search code examples
androiddelphinumbersfiremonkey

Delphi Android TEdit only number


how to make tedit only accept numbers, and reject all buttons except numbers. I can do this on Windows, but on Android I am still confused. thank you


Solution

  • Use a TNumberBox, from unit FMX.NumberBox.

    Pay attention to Min and Max properties though. And also the ValueType property, Integer as default. Set to Float and use DecimalDigits property for decimal numbers