View Single Post
ammyt's Avatar
Posts: 1,918 | Thanked: 3,118 times | Joined on Oct 2010 @ My pants
#1
Seems that I have a little problem with python-hildon button layout:
PHP Code:
import gtk
import hildon

def show_new_window
(widget):
  
win hildon.StackableWindow()
  
# ... configure new window
  
win.show_all()

def main():
  
program hildon.Program.get_instance()

  
win hildon.StackableWindow()
  
win.set_title("Main window")

  
# ... add some widgets to the window
  
button hildon.Button(gtk.HILDON_SIZE_AUTO_WIDTH gtk.HILDON_SIZE_FINGER_HEIGHT,
                           
hildon.BUTTON_ARRANGEMENT_VERTICAL)
  
button.set_text("Some title""some value")

  
image gtk.image_new_from_stock(gtk.STOCK_INFOgtk.ICON_SIZE_BUTTON)
  
button.set_image(image)
  
button.set_image_position(gtk.POS_RIGHT)
  
button.connect("clicked"show_new_window)
  
win.add(button)
  
win.connect("destroy"gtk.main_quitNone)

  
# This call show the window and also add the window to the stack
  
win.show_all()
  
gtk.main()

if 
__name__ == "__main__":
  
main() 
I researched for a week but just couldn't get it. Why is the button appearing as many buttons? When you click any where on the buttons, all of them flash at once as if they're all one button. Any help would be greatly appreciated.
Attached Images