Re: How to retrieve a text string information
- From: "maura.monville@xxxxxxxxx" <maura.monville@xxxxxxxxx>
- Date: 15 Jul 2006 20:38:40 -0700
It's a great idea but I forsee three possible obstacles at
implementing it.
1. Users can place any number of such text strings at will. May I tag
all these text strings the same way (using the same tag) ?
2. By rescaling I mean to multiply the single object y-coordinate by
the inverse of the new aspect ratio. The default aspect ratio is 1:1..
The only other choice is 16:9.
Is this possible by retrieving the text strings through their common
tag ?
I do not use the Tk command "rescale" as it does not result in a canvas
whose aspect ratio is 16:9.
3. Should I need to rescale the text strings font as well (possibly
just choosing a smaller font) is this possible by retrieving the text
strings though the tag ?
Thank you very much for your help.
Maura
Uwe Klein wrote:
Hi,
what about "tagging" these text elements during
creation:
$canv create text .... -tags {special_text tagged_for_rescaling ..}
or later
$canv addtag ..
and then do when it is time to rescale:
foreach item [$canv find withtag {tagged_for_rescaling} ] {
# do the rescaling
}
to keep the items on top
$canv raise tagged_for_rescaling
tagging can be used to advantage,
"find withtag" and imho all other ops that accept tags
allow operating on items selected by logigal ops on tags
i.e tagA||tagB works.
look into the canvas manpage: "ITEM IDS AND TAGS"
uwe
.
- Follow-Ups:
- Re: How to retrieve a text string information
- From: Cameron Laird
- Re: How to retrieve a text string information
- From: Cameron Laird
- Re: How to retrieve a text string information
- From: Jeff Godfrey
- Re: How to retrieve a text string information
- References:
- How to retrieve a text string information
- From: maura.monville@xxxxxxxxx
- Re: How to retrieve a text string information
- From: Uwe Klein
- How to retrieve a text string information
- Prev by Date: Re: Reading-Writing a binary file w/o affecting its data
- Next by Date: Re: How to retrieve a text string information
- Previous by thread: Re: How to retrieve a text string information
- Next by thread: Re: How to retrieve a text string information
- Index(es):
Relevant Pages
|