Posted to tcl by patthoyts at Sat Nov 03 00:08:52 GMT 2007view raw
- package require Tk
- package require tile 0.8
- catch {
- ttk::style element create plain.background from default
- }
- ttk::style layout Plain.TEntry {
- Entry.field -sticky nswe -border 0 -children {
- Entry.border -sticky nswe -border 1 -children {
- Entry.padding -sticky nswe -children {
- Entry.plain.background -sticky nswe -children {
- Entry.textarea -sticky nswe
- }
- }
- }
- }
- }
- ttk::style configure Plain.TEntry -background LightSteelBlue -padding 0 -borderwidth 2
- proc Test {} {
- ttk::entry .e -style Plain.TEntry
- ttk::entry .e2
- grid .e -pady 2 -padx 2
- grid .e2 -pady 2 -padx 2
- }
- Test
- bind . <Control-F2> {console show}
- tkwait window .