/usr/lib64/python2.7/Demo/tkinter/ttk
NameSizeModeActions
img/-0755rm
combo_themes.py16170644editdlrm
combo_themes.pyc19270644editdlrm
combo_themes.pyo19270644editdlrm
dirbrowser.py27170644editdlrm
dirbrowser.pyc39760644editdlrm
dirbrowser.pyo39760644editdlrm
listbox_scrollcmd.py11570644editdlrm
listbox_scrollcmd.pyc16000644editdlrm
listbox_scrollcmd.pyo16000644editdlrm
mac_searchentry.py37180644editdlrm
mac_searchentry.pyc39770644editdlrm
mac_searchentry.pyo39770644editdlrm
notebook_closebtn.py25270644editdlrm
notebook_closebtn.pyc29760644editdlrm
notebook_closebtn.pyo29760644editdlrm
plastik_theme.py95880644editdlrm
plastik_theme.pyc75180644editdlrm
plastik_theme.pyo75180644editdlrm
roundframe.py56010644editdlrm
roundframe.pyc64350644editdlrm
roundframe.pyo64350644editdlrm
theme_selector.py19710644editdlrm
theme_selector.pyc28780644editdlrm
theme_selector.pyo28780644editdlrm
treeview_multicolumn.py42460644editdlrm
treeview_multicolumn.pyc54790644editdlrm
treeview_multicolumn.pyo54790644editdlrm
ttkcalendar.py83180644editdlrm
ttkcalendar.pyc97640644editdlrm
ttkcalendar.pyo97640644editdlrm
widget_state.py27210644editdlrm
widget_state.pyc34080644editdlrm
widget_state.pyo34080644editdlrm
Edit: /usr/lib64/python2.7/Demo/tkinter/ttk/combo_themes.py (1617B)
"""Ttk Theme Selector. Although it is a theme selector, you won't notice many changes since there is only a combobox and a frame around. """ import ttk class App(ttk.Frame): def __init__(self): ttk.Frame.__init__(self) self.style = ttk.Style() self._setup_widgets() def _change_theme(self, event): if event.widget.current(): # value #0 is not a theme newtheme = event.widget.get() # change to the new theme and refresh all the widgets self.style.theme_use(newtheme) def _setup_widgets(self): themes = list(self.style.theme_names()) themes.insert(0, "Pick a theme") # Create a readonly Combobox which will display 4 values at max, # which will cause it to create a scrollbar if there are more # than 4 values in total. themes_combo = ttk.Combobox(self, values=themes, state="readonly", height=4) themes_combo.set(themes[0]) # sets the combobox value to "Pick a theme" # Combobox widget generates a <> virtual event # when the user selects an element. This event is generated after # the listbox is unposted (after you select an item, the combobox's # listbox disappears, then it is said that listbox is now unposted). themes_combo.bind("<>", self._change_theme) themes_combo.pack(fill='x') self.pack(fill='both', expand=1) def main(): app = App() app.master.title("Ttk Combobox") app.mainloop() if __name__ == "__main__": main()