Skip to content

Instantly share code, notes, and snippets.

@ahmedfgad
Created May 6, 2019 15:25
Show Gist options
  • Select an option

  • Save ahmedfgad/2a61b4d0977ba05e0661fce315053860 to your computer and use it in GitHub Desktop.

Select an option

Save ahmedfgad/2a61b4d0977ba05e0661fce315053860 to your computer and use it in GitHub Desktop.
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