I posted earlier that I was trying to draw decorations around a GtkLabel
(which is actually part of a composite widget I wrote that packs a
GtkLabel and GtkEntry into a GtkHBox), which I've done successfully -
thanks. The idea is that I want the decorations to be drawn when
MyWidget gets focus, and "undraw" them when it loses the focus. I wrote
the following draw_focus function, which is called from
my_widget_focus_in() and my_widget_focus_out():
static void my_widget_draw_focus(GtkWidget* widget)
{
g_return_if_fail(widget != NULL);
g_return_if_fail(IS_MY_WIDGET(widget));
if (GTK_WIDGET_HAS_FOCUS(widget)) {
/* draw the decoration */
} else {
gtk_widget_draw(widget, NULL);
}
}
The decorations draw when MyWidget gets focus, but don't go away when it
loses the focus. I've verified that gtk_widget_draw() is being called.
Can anyone tell me what I'm doing wrong?
Thanks!
Davina
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list