Resizing MessageDialog


i found the next problem in porting from perl-Gtk to perl-Gtk2, i don't
really understand.

I create a Dialog with a warning, and if i have some additional info
(output of the command) i add a second button to toggle a textfield with
this extended information.

Everything works like expected from my experience with perl-Gtk, but i'm
not able to set the size of the window, the width always stays very small,
so the text is wrapped up very ugly.

Calling $box->set-resizebale(1) like in the C docu returns an error.

Shortened code:

# creating the dialog:

$box = Gtk2::MessageDialog->new(
         undef, [qw/destroy-with-parent modal/], 'warning', 'none', $t);
$box->set_default_size(600, 0);

if(defined($ext)) {
   $box->add_action_widget($dbutton, 1);

# toggling the textfield

if #open the textfield
   $scrolled = Gtk2::ScrolledWindow->new(undef, undef);
   $buffer = Gtk2::TextBuffer->new();

   $text = Gtk2::TextView->new_with_buffer($buffer);

else #close the textfield
   $box->set_default_size(600, 0);


   /V\           [  sm sm-zone net     GnuPG: 0x7E30CD6D  ]
 /(   )\
  ^ ~ ^  {\$_=\$i++%2?hex:oct;\$_=chr(\$_%(2**2*22));\$_=\$i?lc:{};print;
}';s/\( +\)|[.\/V~^\\\]+| {2,}|\\[\s+.+\s+\\]//g;eval \$_;"&&echo $t|perl

Attachment: pgpM5okHv24d_.pgp
Description: PGP signature

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