Re: Gtk2 docs/tutorials

Dieter Schicker wrote:
I'm new to Gtk2 (not to Perl) and I want to kindly ask if someone can
point me to some good docs/examples/tutorials about gtk2-perl. I looked
at the "official" ones but IMHO they are not very exhaustive for a

What I do is I look at the documentation for the C-api at and than kind of guess how this translates to perl (also there is an document about api translations). But also the C-api is not very exhaustive.

E.g. I'm trying to realize a button with an icon (not a stock icon) and
text in it. How can I do that?

Creat ea button without a label, put the label and the icon into a hbox and add the hbox to the button. Use an alignment object to line-out everything.

   $label = 'Foo';
   $icon = Gtk2::Image->new_from_file('foo.png');
   $hbox = Gtk2::HBox->new;
   $align = Gtk2::Alignment->new(0.5,0.5, 0,0);
   $button = Gtk2::Button->new();

Many thanks in advance
gtk-perl-list mailing list
gtk-perl-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]