Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Homogenous gtk2::table cell size

by aslewis (Novice)
on Jan 18, 2012 at 15:12 UTC ( #948566=perlquestion: print w/ replies, xml ) Need Help??
aslewis has asked for the wisdom of the Perl Monks concerning the following question:

Gtk2::Table->new(3, 3, TRUE);

Is there a good way to set the width and height of the cells in this table?

The only method I can think of is to set the size of each cell individually:

$widget->set_size_request(x, y);

That would be acceptable for a 3x3 table, but perhaps not for a 100x100 table. Is there a more efficient way to do it?

Comment on Homogenous gtk2::table cell size
Select or Download Code
Replies are listed 'Best First'.
Re: Homogenous gtk2::table cell size
by zentara (Archbishop) on Jan 19, 2012 at 12:26 UTC
    You may want to ask on the Perl-Gtk2 maillist for some real expert advice. From my amateur didlings, I would guess that since the table cell size seems to be set from the contents of the cell, looking at controlling content size and the various paddings mentioned in Gtk2::Table, would be the approach to take.

    So maybe setting a certain font, and using Pango's font metrics methods would give you a way to control the cell size. See Gtk2 2d Table Demo and maybe look at the Gtk2 - Pango connection, Gtk2::Pango::FontDescription.

    The newer Gtk3 may also have more Table controls.... it would be best to ask on the Perl/Gtk2 maillist.


    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2015-07-29 03:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls