RE: Controlling resizing of boxes when a window is resized
- From: "Ian Puleston" <ian underpressuredivers com>
- To: <gtk-list gnome org>
- Subject: RE: Controlling resizing of boxes when a window is resized
- Date: Mon, 10 Apr 2006 10:53:20 -0700
Just in case anyone is interested, I lucked out and found the problem below
causing my scrolled window to not expand out and fill the space available. I
have a GtkHSeparator between the upper and lower boxes and due to a
cut-and-paste error I was adding that in using:
gtk_box_pack_start(GTK_BOX(outerVBox), separator, TRUE, TRUE, 5);
Hence it was getting expanded and taking up the space that should have been
allocated to the scrolled window.
Ian
> -----Original Message-----
> From: gtk-list-bounces gnome org [mailto:gtk-list-bounces gnome org] On
> Behalf Of Ian Puleston
> Sent: Wednesday, April 05, 2006 6:15 PM
>
> The reason that I'm using gtk_widget_set_size_request on the upper box is
> that I display a scrolled window in there, and without the size request
> the
> scrolled window is too small and does not expand out to fill the upper
> area.
> I would like to remove that gtk_widget_set_size_request that if I could
> get
> it to expand out.
>
> The code that sets up the boxes and the scrolled window is basically doing
> this:
>
> frameVBox = gtk_vbox_new(FALSE, 0);
>
> /* Upper box for main display: */
> upperHBox = gtk_hbox_new(FALSE, 10);
> gtk_box_pack_start(GTK_BOX(frameVBox), upperHBox, TRUE, TRUE, 0);
>
> /* Add scrolled window into upper box */
> scrWindow = gtk_scrolled_window_new(NULL, NULL);
> gtk_box_pack_start(GTK_BOX(upperHBox), scrWindow, TRUE, TRUE, 0);
>
> /* Lower box for buttons: */
> lowerHBox = gtk_hbox_new(FALSE, 0);
> gtk_box_pack_end(GTK_BOX(frameVBox), lowerHBox, FALSE, FALSE,
> padding);
>
> gtk_container_add(GTK_CONTAINER(mainWin), frameVBox);
>
> But the scrWindow window does not expand out to fill the upper part of the
> window as I thought that it would. Adding a frame to upperHBox so that I
> can
> see it shows that scrWindow fills upperHBox, but upperHBox has not
> expanded
> out to fill the upper area. Hence I added a gtk_widget_set_size_request()
> to
> force it to the required size.
>
> Any idea on why upperHBox would not be expanding out to the full size of
> the
> upper window (i.e. all of the space above lowerHBox), and how to get it to
> do that?
>
> Thanks,
> Ian
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]