On Feb 19, 2008 10:36 PM, yitzle <[EMAIL PROTECTED]> wrote:
> Hi
> I decided throwing a GUI on Perl would be fun so I want to make a Connect
> Four.
> Which GUI module would you advise? It seems the major contenders are
> GTK, GTK2/GTK+ and Tk.
> Tk seems to have the simplest interface which is nice, but it sure
> doesn't look as pretty as GTK.
> I took a peek at the GTK+ docs and, using a C-like API, it looks
> pretty cumbersome.
> I would appreciate if you could share your thought and/or views on the topic.
> Thanks!
snip
Gtk is dead.
Tk is very portable, but a pain in the tuckus.
Gtk2 is fairly portable and provides the best interface for the
programmer. If looking at the docs for Gtk2 have made you think it is
a C-like API then you have been looking at the wrong docs. Here is a
quick hello world:
#!/usr/bin/perl
use strict;
use warnings;
use Gtk2;
Gtk2->init;
my $window = Gtk2::Window->new;
my $vbox = Gtk2::VBox->new;
my $label = Gtk2::Label->new;
my $button = Gtk2::Button->new("press me");
$window->add($vbox);
$vbox->add($label);
$vbox->add($button);
$button->signal_connect(clicked => sub { $label->set_text("Hello World") });
$window->signal_connect(destroy => sub { Gtk2->main_quit });
$window->show_all;
Gtk2->main;
You can read more at http://gtk2-perl.sourceforge.net/
--
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/