Re: Resizing widgets and GtkScrolledWindow



Hi,

ScrolledWindow relies more heavily than your average widget on the way
GTK's size request/allocate cycle works; so that's probably where
you're running into trouble.

Owen can probably list the invariants that need maintaining better
than me. One is that you want to call gtk_widget_size_request() on
children of your custom widget when the custom widget is size
requested, even if you don't really care about their size
request. This is because a) you must always request at least once
before you allocate and b) some widgets will assume they get a size
request when a resize is queued on the toplevel window, e.g. this
happens when the theme changes. So you want to be sure you kept the
size_request implementation from GtkFixed, at least to the extent that
you still request all widgets.

The same basic thing is true of allocate, when the fixed is allocated
you need to allocate all children. 

If that doesn't help and Owen can't guess the problem you might want
to email us your custom container code and we can try to figure it
out. We are eager to have working Java for GTK. ;-)

Havoc









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