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);

        See :

The first arg should be a Gtk2::Window. So you should use $self->window (if I remember correctly).


But it behave like I wanted.

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

        See above.

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

This is not good practice. This should be done by the theme choosen by the user.

--      \^/                                            --
--    -/ O \---------------------------------------    --
--   | |/ \|      Alexandre (Midnite) Jousset      |   --
--    -|___|---------------------------------------    --

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