** Summary ** '''text''' is one of the standard `[[[canvas]]` item types ** Getting Text Dimensions ** To get the dimensions of a text item, use `[[[canvas] bbox]`. Examples: [A Graph plotter]: ''''italic text''''** Demos ** from simple to complex: [canvashelp]: expanding/collapsing text item *** *** *** **** **`'' ====== [http://here.com/photo.gif|png|jpg]http://here.com/what.html%|%link name%|%[your heading2] ====== ''`** **** *** *** *** ''''''** Rotated Text ** '''bold text''' [Rotated canvas text]: [Rotate text on a canvas]: '''''' Ambika sfsffddffgdfgbgfgf'''bold text''' rerrere''frfrfrrrf`frfrfrffr **frfrfrtrr ***rfrffrfrrf ****frfrfrfrfrrffrfrrffrfr'''rrfrrfrfrr''frffrfrffrfr''frfrfrfr'''''''**** *** ** `'' ** Text item background ** Text items are on a transparent background. You can give them an opaque background by first creating the text, then determining its b(ounding )box, drawing a rect with equal `-fill` and `-outline`, and finally raising the text item again. Example, where this happens on demand when the user clicks on a text: ====== $canvas bind text <1> { %W create rect [%W bbox current] -fill white -outline white -tag bg %W lower bg text } $canvas bind text <3> {%W delete bg} ;# RS ====== <> Tk syntax help | Command | Graphics | Widget