Re: Fixing size of window containing 2 buttons



Allin Cottrell wrote:

On Wed, 7 Mar 2007, Jeffrey Barish wrote:

I am just starting with GTK, so no doubt I am missing something
basic.  I have a window with a buttonbox with 2 buttons.  I use
size_allocate on the buttons to position them.  One of the
buttons starts hidden...

It may be possible to get that to work right, but why do you want
to do it?  It's surely making life more difficult.  Why not make
the "not yet" button disabled (gtk_widget_set_sensitive()) until
it becomes relevant?

Allin Cottrell

There are actually 2 buttons that can occupy the blank space -- I simplified
the description of the problem -- so it isn't clear which one to display
disabled.  It's less confusing to display nothing until the state dictates
which button is appropriate.

Since posting my original message, I tried catching configure-event.  The
width specified in the event is also correct.  So where is the width
actually being set if not in size-request or configure-event?

The documentation for set_size_request says that the method sets the minimum
size of a widget to the values specified by width and height.  That's what
I want.  Why isn't it doing that?
-- 
Jeffrey Barish




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