Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from kivy.app import App
- from kivy.lang import Builder
- from kivy.uix.screenmanager import ScreenManager, Screen, FadeTransition
- from kivy.uix.boxlayout import BoxLayout
- from kivy.uix.gridlayout import GridLayout
- from kivy.properties import ObjectProperty, StringProperty
- import win32api
- class MainScreen(Screen):
- pass
- class AnotherScreen1(Screen):
- def check_validation(self,instance,username,password):
- if (username == "") or (password == ""):
- print("Blank spaces are not allowed")
- win32api.MessageBox(0, 'Username and/or Password cannot be Blank', 'Warning')
- elif username == password:
- instance.current = "other2"
- else:
- print("username and password don't match")
- win32api.MessageBox(0, 'Invalid Username and/or Password', 'Warning')
- instance.current = "other1"
- class AnotherScreen2(Screen):
- def screen_transition(self,instance,btn):
- if(btn == 'BACK'):
- instance.current = "other1"
- elif(btn == 'LOGOUT'):
- instance.current = 'main'
- class ScreenManagement(ScreenManager):
- pass
- class MyBox(BoxLayout):
- pass
- buildbox = Builder.load_file("main_box.kv")
- class simplekivy3(App):
- def build(self):
- return buildbox
- if __name__ == '__main__':
- simplekivy3().run()
Add Comment
Please, Sign In to add comment