Leser: 4
3 Einträge, 1 Seite |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#!/usr/bin/perl use strict; use warnings; use Glib qw(TRUE FALSE); use Gtk2 '-init'; my $filename='img_old.png'; my $window = Gtk2::Window->new(); $window->set_border_width(0); $window->set_title ("ImageButton"); my $button = Gtk2::Button->new; $button->set_relief('none'); $button->add(Gtk2::Image->new_from_file($filename)); $button->signal_connect('clicked', sub { print "Klick!\n" }); $window->add($button); $window->signal_connect(destroy => sub {Gtk2->main_quit}); $window->show_all(); Gtk2->main; exit();
3 Einträge, 1 Seite |