Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: How do you make Tk look good?

by cmv (Chaplain)
on Jul 17, 2008 at 21:09 UTC ( #698444=note: print w/ replies, xml ) Need Help??


in reply to Re: How do you make Tk look good?
in thread How do you make Tk look good?

zentara I also used the bbox of Capital-W method, but just recently uncovered something called fontMeasure from Mastering Perl/Tk in Chapter 3 - Font Manipulation Methods. I've not really tried it yet, but would this be a better solution for this problem?


Comment on Re^2: How do you make Tk look good?
Re^3: How do you make Tk look good?
by zentara (Archbishop) on Jul 18, 2008 at 11:44 UTC
    Hi, I think I went with bbox for the Canvas, because it gives BOTH height and width. The fontMeasure says it measures width, and seems to be oriented towards text widgets, that do vertical spacing automatically for you. When you are putting lists on a Canvas, you need to take care of the vertical spacing yourself. I chose the W, since it seemed the biggest( not in honor of George W. Bush:-) ). That way, I can do one calculation for my vertical spacing (assuming font is constant)..... get the bbox of W, take the diff of the y's....add 2 pixels for line spacing.

    I'm not really a human, but I play one on earth CandyGram for Mongo

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://698444]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (10)
As of 2014-09-22 12:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (191 votes), past polls