Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from kivy.app import App
- from kivy.uix.gridlayout import GridLayout
- from kivy.uix.label import Label
- from kivy.uix.textinput import TextInput
- from kivy.uix.button import Button
- import datetime
- now = datetime.datetime.now()
- date = now.strftime("%d/%m/%Y")
- class MainScreen(GridLayout):
- #layout = GridLayout(cols=2, row_force_default=True, row_default_height=40)
- def __init__(self, **kwargs):
- super(MainScreen, self).__init__(**kwargs)
- self.cols = 2
- self.row_force_default=True
- self.row_default_height=40
- self.add_widget(Label(text='Date' ,size_hint_x=None, width=100))
- self.Date = TextInput(multiline=False,text=date)
- self.add_widget(self.Date)
- self.add_widget(Label(text='Till Takings',size_hint_x=None, width=100))
- self.TillTakings = TextInput(multiline=False)
- self.add_widget(self.TillTakings)
- self.add_widget(Button(text='Save', font_size=14))
- class MyApp(App):
- def build(self):
- return MainScreen()
- if __name__ == '__main__':
- MyApp().run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement