#237 ttk::style element image auto-adjusts width

open
Joe English
5
2011-11-17
2011-11-17
Thomas Perschak
No

The ttk element image should recalculate it's width each time the image changes.

************
set inull [image create bitmap]
set ierror [image create photo -file ".../14x14/error.png"]
set iwarning [image create photo -file ".../14x14/warning.png"]

toplevel .tt
ttk::entry .tt.e1
pack .tt.e1 -fill x -expand yes

ttk::style element create Warning image [list $iwarning user1
$inull]
ttk::style element create Error image [list $ierror user2 $inull]

ttk::style layout TEntry {Entry.field -sticky nswe -children
{Entry.padding -sticky nswe -children {Error -side right -sticky w
Warning -side right -sticky e Entry.textarea}}}

.tt.e1 state user2
***************

Details see here: http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/f397b04c019aed9e/9dd04232b096556b?hl=en#9dd04232b096556b

thx

Discussion