Re: window and children resizable



Chris Vine wrote:

On Friday 08 July 2005 08:48, Luca Cappa wrote:
Greg Breland wrote:
On Thu, 2005-07-07 at 08:06, Luca Cappa wrote:
Hello all,

I found that if a create a window and I put inside this window a widget,
the window could not resize itself to a size smaller than the one
requested by its child. How to overcome this problem?
http://developer.gnome.org/doc/API/2.0/gtk/GtkScrolledWindow.html

Adding a scrolled window and then placing you widgets inside will allow
the window to be sized smaller than the child request size.  You don't
have to show the scroll bars if you don't want that, but it's probably a
good idea.  There might be a better way to do this, but I'd use the
scrolled window so when the user does resize the window they can still
scroll to the part they want displayed.
I tryed it, and if I do not display the scroll bar of the ScrolledWindow
the minimum size of the container will be
exactly the size request of the parent. here below there is the code I
used.

It is a bit difficult to penetrate your question. If you don't want the contained widgets to have a minimum size then don't set the widgets to have a minimum size.

Chris

For example, i would simply like to have inside a window a table with two rows: then i add to the first row a widget whose request size is (50, 100), and to the second row another widget with request size equals to (50, 200). If I resize the window, the two widgets must keep their relative dimensions, i.e.
on the vertical axis, 33% for the first widget,  66% for the second widget.

Luca



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