[CLOSED] Text box Type = "number" ability?

Is there an equivalent setting for a textbox somewhere as the HTML type=“number”? I want to get the ability to press the up and down arrows and change the value in the text box.

Moving to “Feature Requests” - We don’t support this yet, but it’s a good idea!

(We’re also aware that it’s a pain to have to keep calling int(self.text_box_1.text) to translate to and from strings. We’re working on it!)

This may also be of use. Conversion to numbers (or any other non-text type), sanity-checking, and much more, is covered by this tiny framework (code and sample app included):

It’s as simple as I could make it. Some of it might become a bit simpler if the field gained an official “on-validate” event. (This would serve a multitude of purposes, not just conversion to number format.) Right now, I have to hook all of the field’s existing events to determine when validation should occur.

In a previous test app, I added up- and down-arrow buttons to a text field. Would anyone be interested in that app?

Hi… any update on this or do we still have to write int(self.text_box_1.text) to save a number written on a text box into the database?

Yes – you can set the type of a TextBox to "number"! See the TextBox docs