Re: Problem packing labels into GtkTable



On Sat, Jul 16, 2005 at 05:08:28PM -0500, Nickolai Dobrynin wrote:
William,

I was initially hesitant to post the code because it uses the C++
bindings, which may not be appropriate for this list, but here goes
(it's really simple):
...
How would you write this in "pure" GTK?  Once I have it in GTK, I will
probably be able to port it to C++.

Pretty good examples are in tutorial
    http://www.gtk.org/tutorial/sec-packingusingtables.html
    http://www.gtk.org/tutorial/sec-tablepackingexamples.html
    http://www.gtk.org/tutorial/sec-scrolledwindows.html

If you want to try out some different layout quickly, then you can use
my GTK+ extension for Bash shell,
    http://home.eol.ca/~parkw/index.html#gtk

Essentially, you would do 
    gtk << EOF
        <window>
        <table size="2x2">
            <label label="label 1"/>
            <label label="label 2"/>
            <label label="label 3"/>
            <label label="label 4"/>
        <table>
        </window>
    EOF
And, the same for buttons
    gtk << EOF
        <window>
        <table size="2x2">
            <button label="label 1"/>
            <button label="label 2"/>
            <button label="label 3"/>
            <button label="label 4"/>
        <table>
        </window>
    EOF

-- 
William Park <opengeometry yahoo ca>, Toronto, Canada
ThinFlash: Linux thin-client on USB key (flash) drive
           http://home.eol.ca/~parkw/thinflash.html
BashDiff: Super Bash shell
          http://freshmeat.net/projects/bashdiff/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]