Sujet : canvas: change the background of a text item De : ralfixx (at) *nospam* gmx.de (Ralf Fassel) Groupes :comp.lang.tcl Date : 30. Oct 2024, 13:00:43 Autres entêtes Message-ID :<ygav7x9x0k4.fsf@akutech.de> User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Is there a way to change the background of a text item on a canvas? I can change the color of the text via -fill, but I found no way to change the background color of the text:
pack [canvas .c] -fill both -expand yes # red text on yellow background .c create text 100 100 -text "Example text" -font {Helvetica 20} -fill red
=> how to change the background of the text field to yellow? i.e. the same as ".c configure -background yellow", but restricted to the area of the text.