Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving text

Status
Not open for further replies.

psycloneranger

Programmer
Mar 21, 2009
2
I'm kind of new (o.k.--<real> new) to tcl/tk, but from the looks of things it might be possible to put a font character in a canvas and bind it so you can move it around with the mouse. Am I right? Comments?

--Lee
 
By "font character", I take it you mean "a character of a particular font". If so then it is possible (although a bit of a pain, IMO). I'm not sure if there are other ways but I would approach this (if I had to):
1 tag the object (character in this case) upon creation
2 bind "button press" to select that object and get it's coordinates
3 bind "button release to get cursor coordinates, reconfigure the coordinates of the object to the new location.

One may ask, though, why are you doing this?

_________________
Bob Rashkin
 
Thank you. Your comments helped put me back on the right track. As to what the 'right track' is, at this point it would probably be better for me to keep my big mouth shut. In a few days (I want to see how this goes first) I might be able to get back to you and let you why I would want to do such a thing.
Thanks again.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top