Re: Resizing MessageDialog
- From: "A. Pagaltzis" <pagaltzis gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: Resizing MessageDialog
- Date: Sat, 2 Apr 2005 10:33:23 +0200
* Stephan Martin <sm sm-zone net> [2005-04-02 09:00]:
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.
Instead of rolling your own solution using a button, you should
use the appropriate widget, in this case an expander.
my $box = Gtk2::MessageDialog->new(
undef,
[ qw/ destroy-with-parent modal / ],
'warning',
'none',
$t,
);
$box->set_default_size(600, 0);
if( defined $ext ) {
my $more = Gtk2::Expander->new( "More information" );
$more->add(
Gtk2::Label->new( $text ) # whichever widget you want
);
$more->show_all();
$box->vbox->add( $more );
}
Regards,
--
#Aristotle
*AUTOLOAD=*_=sub{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]