Re: Remove spaces in dialog window




On Aug 4, 2005, at 12:59 AM, Beast wrote:

muppet wrote:

You didn't show enough code to get full context, so there are several
possibilities.
Are you adding responses to your Gtk2::Dialog? The extra space may be the
empty action area hbox at the bottom of the window.


package Properties;
...
sub new
{
...
   $self->show_all;

   return;
}

uhm, i think you meant

   return $self;


There is extra space between button and lower border of dialog window.

It's the empty action area at the bottom of the window. You haven't added any response buttons.

Try adding this just before your return;

   $self->add_button ('gtk-close' => 'close');


Gtk2::Dialog is designed with a framework for "action buttons" that work with the response signal. The box at the bottom of the window is where those go, and add_button() and friends are how you add them. (You can also add them in the constructor.)

If you don't want the row of buttons at the bottom of the window, then you don't actually want a Gtk2::Dialog.


Is there any side effect when setting default size smaller than actual size of widget?

It allows the widget to be resized fairly freely.



--
Jolt is my co-pilot.
  -- Slogan on a giant paper airplane hung in Lobby 7 at MIT.
     http://hacks.mit.edu/




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