Advertisement
Guest User

ciclo for x gtk.button

a guest
May 21st, 2013
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. list=list_modules()
  2. for i in list:
  3.     button=gtk.Button()
  4.     hb.add(button)
  5.     hb.set_child_packing(button,0,0,0,gtk.PACK_START)
  6.     button.set_size_request(200,200)
  7.     button_image=gtk.Image()
  8.     button_image.set_from_file("modules/"+i+"/"+i+".png")
  9.     button.set_image(button_image)
  10.     button.connect("clicked",lambda *w: play("modules/"+i+"/"+i+".wav"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement