[Glade-devel] Libglade and setting colormaps on window




Thank you so very much. This is what I like about this community, they're
prepared to help others.

All the best.




Tristan Van Berkom wrote:

On Fri, 2007-03-30 at 14:26 -0700, 3saul wrote:
Hello,

I'm creating a simple application using Anjuta 2.1.2 and Glade 3.20
(using
libglade). I'm trying to set a colormap on the main window but am getting
this error:

gtk errors "!GTK_WIDGET_REALIZED (widget) failed

The problem is is that when I check to see if window is in fact realized
with

if (GTK_WIDGET_REALIZED(window))
     {
     printf ("It's realized for gods' sake!");
     }

It returns true. Everything else works as expected. The window displays
on
the screen etc.

You need to set that up after creating the window and before displaying
it, if the toplevel's visible attribute is TRUE, then it will already
be realized and thus its too late.

Set the toplevel window to be invisible, setup your colormap after
glade_xml_new(); and before gtk_widget_show (toplevel).

Cheers,
              -Tristan



_______________________________________________
Glade-devel maillist  -  Glade-devel at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/glade-devel



-- 
View this message in context: 
http://www.nabble.com/Libglade-and-setting-colormaps-on-window-tf3494725.html#a9761336
Sent from the Gnome - Glade - Dev mailing list archive at Nabble.com.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]