Issue
Is it possible to use small pop up message or any suggestion to user that while entering please enter numbers between 40-70. I have designed a sample code in which I want user to enter only values between some range. So can someone please help me out so that I can know whether we can do it or not. Thank You.
Solution
You can use MDTextField
widget from the material design inspired kivy library kivy-md
. This widget has the attribute helper_text
, which you can set to “Please enter numbers between 0 and 70”. You can additionally set an input_filter: “int”
to only allow integer values for this widget. Remember that you still haveto validate the values to be in the desired interval. Below is an example of it.
MDTextField:
hint_text: "Helper text on focus"
helper_text: "This will disappear when you click off"
helper_text_mode: "on_focus"
input_filter: “int”
Answered By - MrYouMath Answer Checked By - Marie Seifert (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.