Hi Monks!,

I'm playing with Gtk2 (thanks zentara for your conseil), i've read the wonderful quick tutorial/how-to/guide Gtk2-Perl Study Guide (very recommended); but it doesn't (nor the Gtk documentation) covers some gtk2-perl objects. :'(

My problem is the following: I want to create a window with a background taken from a pixmap (i read an image with Gtk2::Gdk::PixBuf and obtain a Gtk2::Gdk::Pixmap).

Researching a little bit, i found Gtk2 very close to X11 programming, there are windows and they can be 'drawable' windows, so we can paint over them any background color or he content of a pixmap.

There are two types of windows in Gtk2, Gtk2::Window which has the simplest interface, and allows you to do almost anything (heritage from Gtk2::Widget). And the Gtk2::Gdk::Window, a low level interface, which allows you to the same as in X11 programming (i feel the power ...). For this object, the manuals are a little bit obscure; and i cannot go further without asking for the monks wisdom: did you ever set a background using Gkt2? is there any other way to do it whithout figthing with the greatest docummentation of Gtk2::Gdk::Window? does exists any tutorial to explain how to create and use Gtk2::Gdk::Window? ...

I'm obfuscated, i will try to read the code (if i find it), and if i succeed i will tell to you, my fellowship brothers ...

Cheers

turo

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

In reply to 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.