vertical size of buttons



hello all,

for some reason, my buttons are deciding to fill up their containing
hbox in the vertical direction.

i use the following routine to make buttons next to text entry widgets:


  $MainHBox->pack_start($LeftMainVBox, $false, $false, 0);
  ...
  $tmpHBox = new Gtk::HBox($false, 0);
  my $DataBaseEntry = new Gtk::Entry();
  FramePacker($DataBaseEntry, "Database", $tmpHBox);
  my $DataBaseButton = MakeButton("Database", $tmpHBox, "DataBaseClick");
  $LeftMainVBox->pack_start($tmpHBox, $false, $false, 0);

  sub MakeButton {
     my ($label, $PackingBox, $callback) = @_;
     my $widget = new Gtk::Button($label);
     $widget->signal_connect("clicked", $callback);
     $PackingBox->pack_start($widget, $true, $false, 1);
     return $widget;
  }

  sub FramePacker {
     my $widget = shift;
     my $label = shift;
     my $packingbox = shift;
     my $frame = new Gtk::Frame($label);
     $frame->add($widget);
     $packingbox->pack_start($frame, $true, $true, 0);
  }  



the buttons themselves fill the entire hbox that i pack them into.  so
an hbox that contains a text entry and a button looks like:


   ----------------------------------------------------------
        | -----------------------------------      -----------   |
        | |                                 |      |         |   |
        | |   Text Entry                    |      |Click Me |   |
        | |                                 |      |         |   |
        | -----------------------------------      -----------   |
   ----------------------------------------------------------

and (you have to take my word for it) it looks very unnatural.  what i
*want* to happen is:


   ----------------------------------------------------------
        | -----------------------------------                    |
        | |                                 |      -----------   |
        | |   Text Entry                    |      |Click Me |   |
        | |                                 |      -----------   |
        | -----------------------------------                    |
   ----------------------------------------------------------

can someone explain why the buttons are deciding to fill up the hbox in
the vertical direction?

pete



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