meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
maemo:shared_code [2011/08/18 21:44] grp4 |
maemo:shared_code [2011/08/18 23:19] (current) grp4 |
||
---|---|---|---|
Line 5: | Line 5: | ||
So, add the codes underneath. You can copy the template underneath and just add to the line: | So, add the codes underneath. You can copy the template underneath and just add to the line: | ||
+ | ===== Tutorial for PyGtk ===== | ||
+ | http:// | ||
+ | though not every function in pygtk library does work in maemo as developer were too lazy and didn't import them. like no scrollbar or slidebar exist in maemo. | ||
+ | |||
+ | some examples | ||
+ | <code python examples.py> | ||
+ | def main(self): | ||
+ | # place where fin info about pygtk http:// | ||
+ | win = hildon.StackableWindow() | ||
+ | |||
+ | # Create and pack labels | ||
+ | vbox = gtk.VBox(False, | ||
+ | hbox = gtk.HBox(False, | ||
+ | |||
+ | # | ||
+ | labelHeader = gtk.Label(" | ||
+ | labelSubHeader = gtk.Label(" | ||
+ | |||
+ | # buttonGTK1 = gtk.Button(" | ||
+ | # buttonGTK1.connect(" | ||
+ | |||
+ | buttonGTK = gtk.ToggleButton(" | ||
+ | buttonGTK.connect(" | ||
+ | | ||
+ | #a= gtk.CheckButton(" | ||
+ | # | ||
+ | | ||
+ | #b= gtk.ToggleButton(" | ||
+ | # | ||
+ | | ||
+ | #c = gtk.RadioButton(None, | ||
+ | # | ||
+ | | ||
+ | #adjus = gtk.Adjustment(value=60, | ||
+ | #d = gtk.SpinButton(adjustment= adjus, climb_rate=0.1, | ||
+ | # | ||
+ | #hscrollbar = gtk.HSscrollbar(adjustment) | ||
+ | | ||
+ | # | ||
+ | combo = gtk.Combo() | ||
+ | combo.entry.set_text(" | ||
+ | slist = [ " | ||
+ | combo.set_popdown_strings(slist) | ||
+ | hbox.pack_start(combo, | ||
+ | | ||
+ | hbox.pack_start(buttonGTK, | ||
+ | |||
+ | vbox.pack_start(labelHeader, | ||
+ | vbox.pack_start(labelSubHeader, | ||
+ | vbox.pack_start(hbox, | ||
+ | | ||
+ | | ||
+ | |||
+ | # Add label' | ||
+ | win.add(vbox) | ||
+ | |||
+ | win.connect(" | ||
+ | |||
+ | win.show_all() | ||
+ | |||
+ | gtk.main() | ||
+ | </ | ||
===== Software playtrought ===== | ===== Software playtrought ===== |