Re: configure_event for eventbox

On 8/15/07, David Nečas (Yeti) <yeti physics muni cz> wrote:
On Wed, Aug 15, 2007 at 12:17:00PM -0700, Darren Hart wrote:
> I'm trying to create a widget that lists checkbuttons with labels in a
> tabular format that will adjust it's layout as the window is resized.  I am
> currently using a table widget and have a working resize() method.
> Unfortunately, I haven't been able to capture any kind of a resize event
> other than size_allocate() which unfortunately caused an endless loop since
> my resize()ing the table caused another size_allocate() call apparently.

But it should converge, innit?

It did not converge for me.

  If it doesn't converge, you
have probably a deeper problem.  Also don't resize the table
if you don't want to actually resize it (i.e. the new sizes
would be the same), this might help. 

I am not sure what you mean.  When the width and height of the table widget changes do to a window resize or a hpaned handle move, I need to reconfigure the number of row and columns in the table (although the column width most likely stays the same - unless an element was attached to the table, which would also cause it to reconfigure itself).

 Look at Gimp's toolbox
widget which does something similar.

Excellent idea!  I'll do that (wonder why that didn't occur to me...)

> Reading the docs suggest that what I want to use is a configure_event
> handler

Only windows get configure events.  (And GtkDrawingArea for
some obscure reason, but it gets it only because it
synthetizes it and sends to itself.)

OK, that is what I needed to know.  The documentation is not clear that configure events are much different that other events, and the tip to use an eventbox doesn't qualify it as not working for configure events. 


Darren Hart

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