[Gtk-sharp-list] Background image

Freon freongrr at gmail.com
Tue Aug 9 16:22:53 EDT 2005


Hi,

I'd like to set an image background to a window (and still be able to
add things inside, that's why using a Gtk.Image is out of question).
I've made some researches and found out how it was done in classic
gtk. Yet, it couldn't get it to work with Gtk#.

I've made a simple test program (attached). The window background
isn't changed, but when I resize the window, the image flashes before
the content of the window is redrawn (see attached screenshot).
I guess Gtk tries to fill my window with the background color. Maybe I
should set it to transparent somehow?

To build the test class, copy win.cs and window.png somewhere and run
mcs win.cs /pkg:gtk-sharp /out:win.exe
run with
mono win.exe

I'm using Mono 1.1.7.1+Gtk# bundle on Windows.

Thanks in advance :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: win.cs
Type: text/x-csharp
Size: 686 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20050809/54523d50/win.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: window.png
Type: image/png
Size: 2033 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20050809/54523d50/window.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: resizing.gif
Type: image/gif
Size: 9710 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20050809/54523d50/resizing.gif


More information about the Gtk-sharp-list mailing list