|
From: Mats B. <ma...@pr...> - 2007-10-01 09:33:07
|
My blog post is perhaps of interest here: http://coccinella.im/node/105 and the unpolished code: package require tkpath set size 32 set tkpath::antialias 1 set S [::tkpath::surface new $size $size] $S create prect 2 2 30 30 -rx 10 -fill white -stroke "#a19de2" \ -strokewidth 2 set image [$S copy [image create photo]] $S destroy style element create RR.background image $image \ -border {12 12 12 12} -padding {0} -sticky news style layout RR.TEntry { RR.background -sticky news -children { Entry.padding -sticky news -children { Entry.textarea -sticky news } } } style map RR.TEntry \ -foreground {{background} "#363636" {} black} toplevel .tt set f .tt.f ttk::frame $f -padding 20 pack $f ttk::frame $f.cont -style RR.TEntry pack $f.cont text $f.t -wrap word -borderwidth 0 -highlightthickness 0 \ -width 40 -height 8 bind $f.t <FocusIn> [list $f.cont state focus] bind $f.t <FocusOut> [list $f.cont state {!focus}] pack $f.t -in $f.cont -padx 5 -pady 5 -fill both -expand 1 $f.t insert end "All MSN Messenger wannabies:\nDid you know how to make text widgets with rounded corners?" /Mats |