Re: widget reuse
- From: muppet <scott asofyet org>
- To: Beast <beast i6x org>
- Cc: gtk-perl-list gnome org
- Subject: Re: widget reuse
- Date: Sat, 31 Dec 2005 00:58:19 -0500
On Dec 31, 2005, at 12:36 AM, Beast wrote:
Just curious, why reuse widget is not works:
my $spacer = Gtk2::Label->new();
$spacer->set_size_request(30,0);
$hbox->pack_start($spacer,FALSE,FALSE,0);
$hbox->pack_start($vbbox,FALSE,FALSE,0);
$hbox->pack_start($spacer,FALSE,FALSE,0);
error:
Gtk-CRITICAL **: file gtktable.c: line 598 (gtk_table_attach):
assertion `child->parent == NULL' failed at
Widgets can have only one parent.
Creating an empty label set to 30 pixels wide to separate elements in
an HBox is completely unnecessary, however, as you can specify
padding (that's the last parameter to pack()) and spacing between
children (e.g., $hbox->set_spacing(30)).
--
That's it! It's one thing for a ghost to scare my children, but it's
another to play my theremin!
- Homer Simpson
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]