import urllib import urllib2 import gtk import hildon class MyDialog(gtk.Dialog): def __init__(self,parent): # Init of the dialog with an OK button gtk.Dialog.__init__(self,'Title',parent,gtk.DIALOG_MODAL,(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT)) # Init of a pannable area pann = hildon.PannableArea() # add it to the dialog vbox self.vbox.add(pann) # insertion of a picker button self.pb1 = hildon.PickerButton(gtk.HILDON_SIZE_FINGER_HEIGHT,hildon.BUTTON_ARRANGEMENT_VERTICAL) self.pb1.set_title('PButton 1') self.pb1.show() pann.add_with_viewport(self.pb1) # init of the selector of this Picker Button self.pb1_sel = hildon.TouchSelector(text = True) self.pb1_sel.append_text('Elt 1') self.pb1_sel.append_text('Elt 2') self.pb1_sel.append_text('Elt 3') self.pb1.set_selector(self.pb1_sel) # insertion of an input field self.input1 = hildon.Entry(gtk.HILDON_SIZE_AUTO) self.input1.show() pann.add_with_viewport(self.input1) # insertion of a picker button self.pb2 = hildon.PickerButton(gtk.HILDON_SIZE_FINGER_HEIGHT,hildon.BUTTON_ARRANGEMENT_VERTICAL) self.pb2.set_title('Title 2') self.pb2.show() pann.add_with_viewport(self.pb2) # init of the selector of this Picker Button self.pb2_sel = hildon.TouchSelector(text = True) self.pb2_sel.append_text('Elt 1') self.pb2_sel.append_text('Elt 2') self.pb2_sel.append_text('Elt 3') self.pb2.set_selector(self.pb2_sel) # insertion of an input field self.input2 = hildon.Entry(gtk.HILDON_SIZE_AUTO) self.input2.show() pann.add_with_viewport(self.input2) # insertion of a picker button self.pb3 = hildon.PickerButton(gtk.HILDON_SIZE_FINGER_HEIGHT,hildon.BUTTON_ARRANGEMENT_VERTICAL) self.pb3.set_title('Title 3') self.pb3.show() pann.add_with_viewport(self.pb3) # init of the selector of this Picker Button self.pb3_sel = hildon.TouchSelector(text = True) self.pb3_sel.append_text('Elt 1') self.pb3_sel.append_text('Elt 2') self.pb3_sel.append_text('Elt 3') self.pb3.set_selector(self.pb3_sel) # insertion of a picker button self.pb4 = hildon.PickerButton(gtk.HILDON_SIZE_FINGER_HEIGHT,hildon.BUTTON_ARRANGEMENT_VERTICAL) self.pb4.set_title('Title 4') self.pb4.show() pann.add_with_viewport(self.pb4) # init of the selector of this Picker Button self.pb4_sel = hildon.TouchSelector(text = True) self.pb4_sel.append_text('Elt 1') self.pb4_sel.append_text('Elt 2') self.pb4_sel.append_text('Elt 3') self.pb4.set_selector(self.pb4_sel) # insertion of a picker button self.pb5 = hildon.PickerButton(gtk.HILDON_SIZE_FINGER_HEIGHT,hildon.BUTTON_ARRANGEMENT_VERTICAL) self.pb5.set_title('Title 5') self.pb5.show() pann.add_with_viewport(self.pb5) # init of the selector of this Picker Button self.pb5_sel = hildon.TouchSelector(text = True) self.pb5_sel.append_text('Elt 1') self.pb5_sel.append_text('Elt 2') self.pb5.set_selector(self.pb5_sel) # display of the dialog dialog = MyDialog(None) res = dialog.run() dialog.destroy()