Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use warnings;
- use strict;
- use Glib qw(TRUE FALSE);
- use Gtk2 '-init';
- my $window = Gtk2::Window->new;
- $window->set_title('New Title');
- $window->set_default_size ('250', '150');
- $window->signal_connect('delete-event' => sub { $_[0]->destroy });
- $window->signal_connect('destroy' => sub { Gtk2->main_quit });
- my $hbox = Gtk2::HBox->new;
- my $pixbuf = Gtk2::Gdk::Pixbuf->new_from_file('/home/msgbox/captcha.gif');
- my $image = Gtk2::Image->new_from_pixbuf($pixbuf);
- $hbox->pack_start($image, TRUE, TRUE, 0);
- $window->add($hbox);
- $window->show_all;
- Gtk2->main;
Advertisement
Add Comment
Please, Sign In to add comment