Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Ascertaining attributes of a Tk object

by beretboy (Chaplain)
on Jul 01, 2005 at 15:37 UTC ( #471756=perlquestion: print w/ replies, xml ) Need Help??
beretboy has asked for the wisdom of the Perl Monks concerning the following question:

If I have a function that is being passed a Tk widget object, and only the object, how can I figure out various attributes (height, width, which position its in on the main window grid) about it?


"Sanity is the playground of the unimaginative" -Unknown

Considered: beretboy: "Please Reap. Lo and behold I found the answer within minutes of posting."
Unconsidered: davido: Final vote: (keep/edit/delete) => 20/2/4. Keeps blocked reaping. Others will find node useful.

Comment on Ascertaining attributes of a Tk object
Re: Ascertaining attributes of a Tk object
by beretboy (Chaplain) on Jul 01, 2005 at 15:44 UTC
    This is suprisingly hard to find reading the Tk docs, but very clearly laid out in Chapter 13 of Mastering Perl/Tk:
    $widget->cget(-option)
    Will return the current setting of the option.


    "Sanity is the playground of the unimaginative" -Unknown
Re: Ascertaining attributes of a Tk object
by zentara (Archbishop) on Jul 02, 2005 at 12:18 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2014-07-13 00:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (244 votes), past polls