Setting background image to Window widget
- From: Dharmosoth Seetharam <seetharam_21 yahoo com>
- To: gtk-app-devel-list gnome org
- Subject: Setting background image to Window widget
- Date: Mon, 28 Jan 2008 14:42:54 +0000 (GMT)
Hi All,
I am new to GTK+ programming.
I am using the C interface to work with gtk.
I have problem in putting the background image to the
Gtk window Widget.
my program looks like :
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(window, "TITLE ");
pixmap = gdk_pixmap_create_from_xpm(
GTK_WINDOW(window)->window,
&bitmap,
gdkcolor,
filename);
gdk_window_set_back_pixmap(window->window,
pixmap, FALSE);
gtk_widget_show(window);
gtk_main ();
---------------------
I got compiled successfully.
I can see the popup window but no image at background
to this window.
I got the following message at the console.
#####
(hw_click:358): Gdk-CRITICAL **:
gdk_pixmap_colormap_create_from_xpm: assertion
`drawable != NULL || colormap != NULL' failed
(hw_click:358): Gdk-CRITICAL **:
gdk_window_set_back_pixmap: assertion `GDK_IS_WINDOW
(window)' failed
####
Can anybody please point me what is the wrong and
suggest me the right way to set the background image
to the window.
Thanks in advance.
--Seetharam
Chat on a cool, new interface. No download required. Go to
http://in.messenger.yahoo.com/webmessengerpromo.php
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]