[Gtk-sharp-list] Set ap background pixmap to a GTK window
Mauro Galli
maurog at it.homelinux.net
Tue Oct 24 18:26:18 EDT 2006
Hello to everyone,
I have a problem to set the backgroud of a window.
The code:
void _GtkWindowSplash_Realized(object sender, EventArgs e)
{
Gdk.Pixmap Background;
Background =
Gdk.Pixmap.CreateFromXpm(this._GtkWindowSplash.GdkWindow, "Images" +
System.IO.Path.DirectorySeparatorChar + "Splash.png");
System.Diagnostics.Debug.Assert(Background != null, "Cannot
found background image.");
this._GtkWindowSplash.Style.SetBgPixmap(Gtk.StateType.Normal,Background);
}
Where _GtkWindowSplash is a Gtk Window and the code is in the Realized
event.
The code runs perfectly under Windows, but in a linux box no image is
displayed.
Someone can tell me where is the error?
Mauro
PS Exuse for m English.
More information about the Gtk-sharp-list
mailing list