Re: Underlining text on canvas
- From: hgiese@xxxxxxxxxxxxx (Helmut Giese)
- Date: Fri, 30 Dec 2005 22:05:53 GMT
On 30 Dec 2005 12:36:19 -0800, "bluetit" <capricious.falcon@xxxxxxxxx>
wrote:
>Given a text tag on a canvas, I would like to underline one letter in
>that text... using font measure to get it's start and end point and
>then drawing a line with those coords doesn't do a good job (line does
>not evenly underline the character, with some characters it's to the
>right more, with others to the left more).
Hi Tom,
the tags of the text widget have an underline option which you could
use like
---
pack [text .t]
..t tag configure ul -underline 1
..t insert end "Some "
# "tag" any text you want
..t insert end "T" ul
..t insert end "ext"
---
Uups, re-reading your post I just notice that you are talking of a
text item on a canvas. Now, the canvas supports the tagging mechanism
as well, but I don't know if 'underline' is available for its text
items.
HTH nonetheless
Helmut Giese
.
- Follow-Ups:
- Re: Underlining text on canvas
- From: bluetit
- Re: Underlining text on canvas
- References:
- Underlining text on canvas
- From: bluetit
- Underlining text on canvas
- Prev by Date: Packaging tcl packages.
- Next by Date: Re: Tcl vs. Lua
- Previous by thread: Underlining text on canvas
- Next by thread: Re: Underlining text on canvas
- Index(es):
Relevant Pages
|