Re: Colormap and drawing_area widget
- From: Mathieu Lacage <mathieu_lacage myrealbox com>
- To: Luc Maurette sanofi-synthelabo com
- Cc: gtk-list gnome org
- Subject: Re: Colormap and drawing_area widget
- Date: Tue, 18 Nov 2003 11:22:15 +0100
On Tue, 2003-11-18 at 11:14, Luc Maurette sanofi-synthelabo com wrote:
> Hi everybody,
> I have a little pb with gtk_drawing_area. I read tutorial and API
> documentation but i don't find the answer : why i obtain this error message
> when using the code below ?
because the window field of the GtkWidget is valid only when the widget
is "realized". You need to connect a signal handled to the "realized"
signal and get the colormap from within this signal handler.
Mathieu
>
> *************Code*********************
> GtkWidget *ZoneDessin;
> GdkColormap *colormap;
>
> ZoneDessin = gtk_drawing_area_new();
> colormap = gdk_window_get_colormap(ZoneDessin->window);
>
> *************Error***********************
> Gdk-CRITICAL **: file gdkdraw.c: line 244 (gdk_drawable_get_colormap):
> assertion `GDK_IS_COLORMAP (colormap)' failed
>
> Thanks, Luc.
>
>
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
--
Mathieu Lacage <mathieu gnu org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]