in reply to Re^3: Perl-Gtk2::How to set a window background image.
in thread Perl-Gtk2::How to set a window background image.
Hi! I think this is my first contribution hehe...
I Got this code from the php cookbook, and converted it to Perl. It worked for me :)
NOTE: apple.png NOT INCLUDED.my $back_pixbuf = Gtk2::Gdk::Pixbuf->new_from_file("apple.png"); my ($pixmap,$mask) = $back_pixbuf->render_pixmap_and_mask(255); my $style = $window->get_style(); $style=$style->copy(); $style->bg_pixmap("normal",$pixmap); $window->set_style($style);
|
---|
In Section
Seekers of Perl Wisdom