Re: Gtk2::Dialog ... adding a label
- From: muppet <scott asofyet org>
- To: gtk-perl list <gtk-perl-list gnome org>
- Subject: Re: Gtk2::Dialog ... adding a label
- Date: Tue, 25 May 2004 22:09:33 -0400
On Tuesday, May 25, 2004, at 08:10 PM, A. Pagaltzis wrote:
* Daniel Kasak <dkasak nusconsulting com au> [2004-05-26 01:56]:
my $label = Gtk2::Label->new ($message);
$dialog->vbox->add ($label);
$label->show();
less succinctly... ;-)
your label was indeed being added, it just wasn't being shown, because
you didn't ask for it to be shown.
Gtk2::Dialog::run() (actually gtk_dialog_run()) calls
Gtk2::Widget::show() (or gtk_widget_show()) on the dialog under the
hood.
gtk_widget_show() only shows the widget on which you call it. it will
not show all of that widget's children. gtk_widget_show_all() (or
Gtk2::Widget::show_all() in perl) does that, but it's not always a good
idea to call show_all(), as there may be some children which are
intentionally not visible.
--
I don't have a drinking problem,
'cept when i can't get drink.
-- Tom Waits
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]