Re: [pygtk] Problems with my first pygtk program

Cross-posting since it is a GTK+ question to see if anybody else has a

On Thu, Apr 10, 2003 at 11:09:19AM +0200, Antoon Pardon wrote:
On Wed, Apr 09, 2003 at 10:04:09AM -0300, Christian Reis wrote:
On Wed, Apr 09, 2003 at 02:13:55PM +0200, Antoon Pardon wrote:

Third problem is that I would like to have fixed sizes
for all the widgets.
(not all, some! :-)

I am writing a dril program for my daughter so that she can test
and exercise her latin vocabulary. I am using a table 24 rows

Interesting application. Your GtkTable:

| Latin word | Entry 1              | Entry 2                           |
|            | Correction           | Correction                        |

This is an interesting (however common) problem. Depending on the
contents of the Correction labels, they will end up expanding and
causing the layout of the window to change. Avoiding this behaviour is
not trivial.

Horizontal layout is a lot harder to handle because of the way western
writing works; perhaps for this reason most of the applications I've
worked on use vertical layout when we have dynamic label updates.

There really isn't a trivial solution (at least in Gtk+ 1.2) that solves
this problem without fixing a widget size. You can try turning "wrap" on
for the labels and seeing if the display resizes less (it should, but it
will still resize). Note that you only need to fix the size of the
labels; the rest will not expand dynamically. 

Maybe the new GtkLayout can help you out here. I'm not sure, but others
on the list probably will be.

So that is why I think some kind of fixing the sizes of the widgets
is a good idea in this case.

Not a good idea, but perhaps unavoidable. It would be nice to manually
be able to state "this column has 40% of the width, this one has 20%,
the other has 40%". Reminds someone of HTML widths? :-)

Take care,
Christian Reis, Senior Engineer, Async Open Source, Brazil. | [+55 16] 261 2331 | NMFL

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