gtk_draw_shadow ?



Hello, i have the following lines of code :

eventbox = gtk_event_box_new();
gtk_widget_ref(eventbox);
gtk_signal_connect(GTK_OBJECT(eventbox), "button_press_event",
		       GTK_SIGNAL_FUNC(show_color_dialog),
		       NULL);
preview= gtk_preview_new (GTK_PREVIEW_COLOR);
gtk_preview_size (GTK_PREVIEW (preview), 32, 32);
for (i=0;i<=32;i++)
{
 gtk_preview_draw_row (GTK_PREVIEW (preview), color, 0, i, 32);			
}
gtk_widget_show(preview);
gtk_draw_shadow  (preview->style,preview->window,
		       GTK_STATE_NORMAL,
		       GTK_SHADOW_OUT,0,0,32,32);
gtk_container_add(GTK_CONTAINER(eventbox), preview);   

I have an eventbox with a preview inside, now i want to draw a shadow around
this to make it look more nice ... But while running the app the following
message appears :

Gtk-CRITICAL **: file gtkstyle.c: line 1346 (gtk_default_draw_shadow): assertion `window != NULL' failed.

How can i draw a shadow around a eventbox or a preview ???

MfG 
--
Andreas Scherf

scherfa@fh-trier.de             
http://www.fh-trier.de/~scherfa

"It said uses Windows 98 or better, so I loaded Linux!"



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