Re: Gtk2 docs/tutorials



On Tue, 2006-08-15 at 13:52 +0200, Dieter Schicker wrote:
Hi,

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
newcomer.

If you need the GTK+ part covered, then http://developer.gnome.org has
some pointers; I usually get back to the C API reference and to the
header files even when I'm coding in Perl.

As for gtk2-perl, there's also the wiki page:

  http://live.gnome.org/GTK2-Perl

which has the FAQ and the "quick recipe" list.

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

This won't be covered in a tutorial, but more likely in a recipe-style
documentation.  A Gtk2::Cookbook pod might come out handy, if anyone
wants to tackle this. *hint* *hint* ;-)

 How can I do that?

If your GTK and gtk2-perl bindings are recent enough you should be able
to do it the easy way:

  my $image_button = Gtk2::Button->new;
  $image_button->set_image(Gtk2::Image->new_from_file('some-file.png'));

otherwise, there's the hard way:

  my $image_button = Gtk2::Button->new;
  $image_button->add(Gtk2::Image->new_from_file('some-file.png'));

for further reference, see:

  perldoc Gtk2::Button
  perldoc Gtk2::Image

Ciao,
 Emmanuele.

-- 
Emmanuele Bassi,  E: ebassi gmail com
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net




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