Created
July 4, 2022 13:30
-
-
Save Twilight0/2d883f94a949a4ddfc0ab8b80a03475d to your computer and use it in GitHub Desktop.
Kivy test
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
import kivy | |
kivy.require('1.10.0') | |
from kivy.app import App | |
from kivy.uix.gridlayout import GridLayout | |
from kivy.uix.label import Label | |
from kivy.uix.textinput import TextInput | |
class LoginScreen(GridLayout): | |
def __init__(self, **kwargs): | |
super(LoginScreen, self).__init__(**kwargs) | |
self.cols = 2 | |
self.add_widget(Label(text='User Name')) | |
self.username = TextInput(multiline=False) | |
self.add_widget(self.username) | |
self.add_widget(Label(text='password')) | |
self.password = TextInput(password=True, multiline=False) | |
self.add_widget(self.password) | |
class MyApp(App): | |
def build(self): | |
return LoginScreen() | |
if __name__ == '__main__': | |
MyApp().run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment