write-only properties? (was Re: window border)
- From: Joe Smith <jes martnet com>
- To: gtk-perl-list gnome org
- Subject: write-only properties? (was Re: window border)
- Date: Wed, 17 Sep 2003 18:11:17 -0400
Once upon a time, muppet wrote:
Muppet, it seems that many of the widgets don't implement properties.
actually, they do.
...
Gtk2::Container properties
"border-width" gulong : Read / Write
"resize-mode" GtkResizeMode : Read / Write
"child" GtkWidget : Write
$container->set (border_width => 4);
$widget = $container->get ('child');
So, since the 'child' property is not readable, that last line won't
actually work, right?
I was just playing with this and got:
-------------
use Gtk2 -init;
$btn = Gtk2::Button->new( 'Click me' );
$btn->get('child');
-------------
(x.pl:6824): Gtk-WARNING **: gtkcontainer.c:874: invalid property id 3
for "child" of type `GParamObject' in `GtkButton'
Is this a different 'child' than the label added to the
button/container? Ok, yeah, that must be what's befuddled me.
What's the point of a write-only property?
<Joe
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]