Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Test(object):
- def __init__(self, attr):
- self.attr = attr
- 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)
- print self.username.text
- class Login(App):
- def build(self):
- Window.borderless = True
- return LoginScreen()
- import classtest, gui
- users = ['user_name1', 'user_name2', 'user_name3']
- gui.Login().run()
- for u in users:
- test = classtest.Test(u) # this should update the user text field on the windows login automatically, but how?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement