Re: Remove spaces in dialog window

Beast said:

our @ISA = qw(Gtk2::Dialog);

sub new
    my ($class, $parent, $title)  = @_;
    my $self = {};
    bless($self, $class);

    $self->{win} = $class->SUPER::new($title, $parent, "modal");

This is very dangerous.  A plain, unmagical, blessed perl hash cannot be used
as a Gtk2::Widget, because there is no actual C GObject backing it.

Either use Glib::Object::Subclass to subclass Gtk2::Dialog (or any widget), or
rebless the actual widget like this:

   my $self = $class->SUPER::new(...);
   bless $self, $class;

In the bottom of dialog box/window, it has spaces (arround 5px) between
the last widget and the window border. However, it's not happen with in
the top, which no space between border and first widget.
How do I remove the additional spaces?

| [widget A]
| [widget B]
|               <---- there is additional spaces here...

You didn't show enough code to get full context, so there are several

Are you adding responses to your Gtk2::Dialog?  The extra space may be the
empty action area hbox at the bottom of the window.

Did you set a default size for the window?  If so, then that's probably
leaving plenty of space due to packing parameters.

muppet <scott at asofyet dot org>

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