Howto set horiz space/padding between vbox and statusbar?



All,

I have been pulling my hair out trying to tweak the padding between a GtkVBox and a GtkStatusbar. I have the following main window layout:

  main window
      vbox = gtk_vbox_new (FALSE, 0);
          menubar
          scrolled-window
              textview
          statusbar

The problem is the scrolled-window and textview widgets provide a nice 10 pixel border created with:

    gtk_text_view_set_left_margin (GTK_TEXT_VIEW (app->view), 5);
    ...
    gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 5);

The statusbar however, is positioned snugly against the left border of the main window and vbox at the bottom. I would like to move the statusbar display to the right (pad it on the left) by 10 pixels to match the textview.

I have tried adjusting the padding with the following:

    /* create/pack statusbar at end */
    app->statusbar = gtk_statusbar_new ();

    gboolean expand = 0;
    gboolean fill = 0;
    guint pad = 0;
    GtkPackType packtype = 0;

gtk_box_query_child_packing (GTK_BOX (vbox), app->statusbar, &expand, &fill, &pad, &packtype);
    pad += 10;
gtk_box_set_child_packing (GTK_BOX (vbox), app->statusbar, expand, fill, pad, packtype);

    status_set_default (app);
    gtk_box_pack_end (GTK_BOX (vbox), app->statusbar, FALSE, FALSE, 0);

However, there is no change in the statusbar display. What say the experts? What part of the object hierarchy am I missing/screwing up? Thanks.

p.s. sorry if you get 2 copies, the first went to the 'requests' list by mistake.

--
David C. Rankin, J.D.,P.E.


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