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:

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; }
When you paint over a drawable, you only need to Sync the window, but this is a job for the Gtk2::main, no?

I'm anxious for the weekend to come!

turo

perl -Te 'print map { chr((ord)-((10,20,2,7)[$i++])) } split //,"turo"'

In reply to Re^2: Perl-Gtk2::How to set a window background image. by turo
in thread Perl-Gtk2::How to set a window background image. by turo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.