Posted to tcl by emiliano at Tue Dec 30 15:04:05 GMT 2008view raw
- package require Tk
- pack [ttk::notebook .nb -style Plain.TNotebook] -side right -fill both -expand 1
- pack [ttk::treeview .tv -show tree] -fill both
- foreach theme [ttk::style theme names] {
- ttk::style theme settings $theme {
- ttk::style layout Plain.TNotebook.Tab null
- ttk::style layout Plain.TNotebook null
- }
- .tv insert {} end -id $theme -text $theme
- .nb insert end [ttk::frame .nb.$theme]
- pack [label .nb.$theme.label -bg white -text "I'm theme $theme"] \
- -expand 1 -fill both -padx 20 -pady 20
- }
- bind .tv <<TreeviewSelect>> \
- {.nb select .nb.[ttk::setTheme [%W select]] }