in reply to Re: Perl-Gtk2::How to set a window background image.
in thread Perl-Gtk2::How to set a window background image.
zentara i need time to digest this ... I suposse, i must read a gtk2 tutorial in C, and then read seriusly the Gtk2-perl docs (maybe this weekend)...
For what i wanted to do, i finally use xpm images, preload them onto a pixmap, and then use the Gtk2::RcStyle for change my style everytime i want to...
But, this invitation to master the Gtk2, calls me like the Dark Power ... (Gtk2 for perl is the simplest (forgetting our problems) API for programming user graphics interfaces ... but now ... now Gtk2 will be as powerfull for us like programming over X11 with the Xlibs ... )
Forgetting my delirium; I've changed your "set_bg" version. It works fine, but i've simplified it:
When you paint over a drawable, you only need to Sync the window, but this is a job for the Gtk2::main, no?sub set_bg{ my $pixbuff = Gtk2::Gdk::Pixbuf->new_from_file("1Zen16.png"); #set the new pixbuff in a vbox my $gdkwindow = $vbox1->window; my $gc = Gtk2::Gdk::GC->new ($gdkwindow, undef); $pixbuff->render_to_drawable($gdkwindow, $gc, 0,0,0,0,500,430,'normal',0,0); return FALSE; }
I'm anxious for the weekend to come!
turo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Perl-Gtk2::How to set a window background image.
by zentara (Cardinal) on Feb 15, 2006 at 13:04 UTC | |
by renegadex (Beadle) on Nov 22, 2008 at 03:03 UTC |