Created
May 6, 2019 15:25
-
-
Save ahmedfgad/2a61b4d0977ba05e0661fce315053860 to your computer and use it in GitHub Desktop.
This file contains hidden or 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.app | |
| import kivy.uix.button | |
| import kivy.uix.boxlayout | |
| class FirstApp(kivy.app.App): | |
| def build(self): | |
| self.button1 = kivy.uix.button.Button(text="Button 1") | |
| self.button2 = kivy.uix.button.Button(text="Button 2") | |
| self.button3 = kivy.uix.button.Button(text="Button 3") | |
| self.button4 = kivy.uix.button.Button(text="Button 4") | |
| self.button5 = kivy.uix.button.Button(text="Button 5") | |
| self.layout = kivy.uix.boxlayout.BoxLayout(orientation="horizontal") | |
| self.layout.add_widget(widget=self.button1) | |
| self.layout.add_widget(widget=self.button2) | |
| self.layout.add_widget(widget=self.button3) | |
| self.layout.add_widget(widget=self.button4) | |
| self.layout.add_widget(widget=self.button5) | |
| return self.layout | |
| firstApp = FirstApp(title="Horizontal BoxLayout Orientation.") | |
| firstApp.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment