Re: widget visibility

haratron <haratron gmail com> writes:


They could be property settings in the builder xml I expect.

$window->signal_connect( "destroy" => sub {

And that too as
    <signal name="destroy" handler="do_quit"/>
    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>

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]