Last active
June 6, 2021 18:49
-
-
Save driscollis/dee58221dcb860be5731 to your computer and use it in GitHub Desktop.
Kv Login example
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
<LoginScreen@GridLayout>: | |
my_username: username | |
my_password: password | |
rows: 2 | |
cols: 2 | |
padding: 5 | |
spacing: 5 | |
Label: | |
text: 'User Name:' | |
TextInput: | |
id: username | |
Label: | |
text: 'Password:' | |
TextInput: | |
id: password | |
password: True |
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
# http://kivy.org/docs/gettingstarted/rules.html | |
from kivy.app import App | |
from kivy.uix.gridlayout import GridLayout | |
class LoginScreen(GridLayout): | |
pass | |
class LoginScreenApp(App): | |
def build(self): | |
screen = LoginScreen() | |
return screen | |
if __name__ == "__main__": | |
LoginScreenApp().run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment