Skip to content

Instantly share code, notes, and snippets.

@SpaceVoyager
Created November 8, 2015 02:18
Show Gist options
  • Save SpaceVoyager/11e719b3dad8d4b78af2 to your computer and use it in GitHub Desktop.
Save SpaceVoyager/11e719b3dad8d4b78af2 to your computer and use it in GitHub Desktop.
buttons_in_a_row.py
import ui
v = ui.View(background_color=(0.50, 0.50, 0.50))
v.present('full_screen')
for i in range(8):
button = ui.Button(title=str(i+1))
button.background_color = (1,1,1)
button.font = ('Futura-CondensedExtraBold', 100)
button.width = v.width/8
button.height = button.width
button.border_width = 1
button.x = v.width/8*i
button.y = v.height/2 - button.height/2
v.add_subview(button)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment