Last active
August 24, 2018 23:41
-
-
Save matham/45c4f1fbd8c3fccf6557b3b48356cd50 to your computer and use it in GitHub Desktop.
gui
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.lang import Builder | |
from kivy.app import runTouchApp | |
runTouchApp(Builder.load_string(''' | |
#:import Factory kivy.factory.Factory | |
BoxLayout: | |
orientation: 'vertical' | |
padding: "12dp" | |
spacing: "12dp" | |
Label: | |
text: "Please enter 3 numbers" | |
BoxLayout: | |
spacing: "10dp" | |
Entry: | |
id: a | |
hint_text: "A" | |
Entry: | |
id: b | |
hint_text: "B" | |
Entry: | |
id: c | |
hint_text: "C" | |
Label: | |
text: "The sum is {}".format(a.val + b.val + c.val) | |
<Entry@TextInput>: | |
input_filter: "float" | |
val: float(self.text) if self.text else 0 | |
''')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment