Re: Gtk2::Dialog ... adding a label
- From: Daniel Kasak <dkasak nusconsulting com au>
- To: gtk-perl list <gtk-perl-list gnome org>
- Subject: Re: Gtk2::Dialog ... adding a label
- Date: Wed, 26 May 2004 15:48:21 +1000
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);
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.
One more small problem ... the buttons I get in the dialog are pressed
hard against the right-hand side of the dialog ( when the text of my
message is longer than the 2 buttons ). I could add an hbox with
homogeneous spacing and add buttons to that, but is there an easier way
of getting the buttons evenly spaced across the dialog?
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak nusconsulting com au
Title: CanIt Vote for ID 47197
The following links have been placed here by the
NUS Consulting internal spam filter
and are for use by NUS Consulting staff only.
Please ingore these links.
Forget previous vote
] [Thread Prev