Re: error dialog not centered



Beast wrote:

I have these following code:

...

sub cb_ok {
   my $self = shift;
   ...
my $dialog = Gtk2::MessageDialog->new($self, 'modal', 'error', 'ok', $message);

   $dialog->set_position('center-on-parent');
}

But it behave like I wanted.

It should be: but it doesn't behave as i expected. :)


1. The error pop-up did not center in their parrent, but seems on top-left of screen.

I think the problem might because of variable $self is undefined, but I
have sure that $self is defined (the parent window):

   print "self is defined: $self" if defined $self;

So, what could be the reason?


2. How to make the "OK" button centered (presently it right alignment)?
3. How to remove the icon on the "OK" button?




--

--beast



--

--beast

http://sum.ldap.or.id/blog




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