Re: Problem with resize
- From: Owen Taylor <otaylor redhat com>
- To: "Emmanuel DELOGET" <pixel epita fr>
- Cc: "GTK LIST" <gtk-list redhat com>
- Subject: Re: Problem with resize
- Date: 15 Aug 1999 10:06:38 -0400
The problem you are experiencing here is that
size renegotiation only goes high enough up
the tree so that every widget has at least as
much space as it requested.
If you want it to go higher, you should call
gtk_widget_queue_resize() explicitely.
In particular, you need to call it on ax
_child_ of the container you want to get
reallocated.
[ Well, you can call it on the container itself,
but calling it on the child is more
efficient, since it doesn't propagate to
the parent of the container ]
> (1) well - I experienced some problems with reparenting
> [Gdk-Critical in gdk_window_reparent() - Gdk loses the
> window when I do a lot of reparent on the same
> widget/group of widget. By the way, I read the discussion
> about the current reparenting bug - on composed widgets.
> Perhaps it may be a good idea to have a way to register
> widgets that are associated to another widget [such as
> the two arrows of a spin button]. Another possibility is
> to propagate the reparent message - by using the
> (*reparent)() field of the GtkWidgetClass. This should
> probably be a better idea, since it will not break the
> 1.2 line.
The thing that needs to be emphasized here is:
Reparenting offers almost no advantage over
ref()/remove()/add()/unref().
There is sophisticated code in GTK+ to reparent.
Unfortunately, it is not sophisticated enough,
and makeing it sophisticated enough probably will
involve ugly hacks.
Very likely, reparent() will just become
ref()/remove()/add()/unref() in a future
version of GTK+. So if you do it that way,
you will be ahead of the game.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]