Re: widget visibility
- From: Kevin Ryde <user42 zip com au>
- To: gtk-perl-list gnome org
- Subject: Re: widget visibility
- Date: Thu, 25 Nov 2010 08:32:04 +1100
haratron <haratron gmail com> writes:
$window->set_border_width(0);
$window->set_position('center_always');
They could be property settings in the builder xml I expect.
$window->signal_connect( "destroy" => sub {
Gtk2->main_quit;
});
And that too as
<signal name="destroy" handler="do_quit"/>
with
sub do_quit { Gtk2->main_quit; }
my @listing_cbox = qw/one two three four five six/;
# This is supposed to append the @listing to the
# combobox
foreach $text (@listing_cbox) {
$cbox->append_text ($text)
}
For interest, I had a go at Gtk2::Ex::ComboBox::Text (on cpan) as a text
style combobox subclass. I wanted "active-text" as a property, but I
also put in an "append-text" pseudo property allowing append_text() from
builder xml. Eg. (or complete program in the sources),
<object class="Gtk2__Ex__ComboBox__Text" id="combo">
<property name="append-text">First Choice</property>
<property name="append-text">Second Choice</property>
<property name="active">0</property>
</object>
I'm not sure how often the choices would be hard coded into xml like
that, but it's another way to do it ...
--
That money was only resting in my account, earning valuable
interest for the orphanage.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]