Hi, This is a curious situation, You should not have to be using hard coded sizes here in order to share the space. The main difference I think you are facing is that a scrolled window requests a natural height of it's content but a minimum hight of 0 (or the height required for a horizontal scrollbar). One thing I dont understand, is why you have a viewport outside of a scrolled window, what is that intended to do ? Certainly, the viewport requires all the vertical space and so none is left over for the scrolled window below (how would that be unexpected ?). Cheers, -Tristan On Sat, Feb 16, 2013 at 8:26 PM, HW Krus <hwkrus@xxxxxxxxx> wrote: > Thanks! > > Looks like somehow the scrolled_window widget messes up its dimensions. > > Using size_request: > > vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5); > gtk_widget_set_size_request(viewport,400,150); > gtk_widget_set_size_request(swin,400,150); > gtk_box_pack_start(GTK_BOX (vbox), viewport, TRUE, TRUE, 0); > gtk_box_pack_start(GTK_BOX (vbox), swin, TRUE, TRUE, 0); > > Results in: > http://img703.imageshack.us/img703/3624/scrolledwindowsizereque.png > > With other words only swin's height is honoured (its width not). The > viewport requests are neglected. > > Using set_ homogeneous as in: > > vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5); > gtk_box_set_homogeneous(GTK_BOX (vbox),TRUE); > gtk_box_pack_start(GTK_BOX (vbox), viewport, TRUE, TRUE, 0); > gtk_box_pack_start(GTK_BOX (vbox), swin, TRUE, TRUE, 0); > > results in both viewport and scrolled swin widgets to be expanded vertically > so the top window encompasses them both (which makes the use of a scrollbar > and viewport useless). > > Putting viewport and swin in a hbox first does not help; swin's height is > again only one row (and full width). Using size_request on the hboxes > results in the same figure as shown above. > > The paned version: > > vbox = gtk_paned_new(GTK_ORIENTATION_VERTICAL); > gtk_paned_pack1(GTK_PANED (vbox), viewport, TRUE, TRUE); > gtk_paned_pack2(GTK_PANED (vbox), swin, TRUE, FALSE); > > Results in: > http://img203.imageshack.us/img203/3716/scrolledwindowpanedgtk3.png > > The width is again around 600 pixels. And if one labels each button > individually (as has been done in the picture) it is clear that after > panning the top rows of the viewport are inaccessible. > > The Gtk2 version is so easy and simple to understand; it cannot be that a > similar Gtk3 version is so difficult to obtain. > > Regards > > > > _______________________________________________ > gtk-list mailing list > gtk-list@xxxxxxxxx > https://mail.gnome.org/mailman/listinfo/gtk-list > _______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx https://mail.gnome.org/mailman/listinfo/gtk-list