Answer the question
In order to leave comments, you need to log in
How to take text from textfield kivy md?
I made a textfield using kivymd but I don't know how to use what can be written there. For example, make a button that will use the text from the textfield
from kivy.lang import Builder
from kivymd.app import MDApp
from kivy.uix.screenmanager import ScreenManager, Screen
from kivymd.uix.textfield import MDTextField
from kivy.core.window import Window
Window.clearcolor = (23/255, 23/255, 23/255, 1)
Window.title = "Number"
KV = '''
<Number>:
MDTextField:
id: TakenNum
size_hint_x: None
width: "300dp"
hint_text: "Enter number (+373, no space)"
max_text_length: 12
line_color_normal: 0, 0, 0, 0.5
line_color_focus: 0, 0, 0, 1
pos_hint: {"center_x": .5, "center_y": .8}
'''
class SmsBomb(MDApp):
def build(self):
return Builder.load_string(KV)
SmsBomb().run()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question