Re: force drawing area expose on button click
- From: Soeren Sandmann <sandmann daimi au dk>
- To: Scott Rubin <slr2777 cs rit edu>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: force drawing area expose on button click
- Date: 16 Feb 2004 19:12:39 +0100
Scott Rubin <slr2777 cs rit edu> writes:
I think I may have done it wrong. To put it simply. How can I force
the expose event to happen on the drawing_area widget whenever a
clicked event is signaled on one of my button widgets. Thanks.
You should just queue a draw on the widget. Don't process_updates();
gtk+ will do that automatically in due course.
The standard way to do what you want is simply to
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (redraw), drawing_area);
with redraw() looking something like
static void
redraw (GtkWidget *button,
GtkWidget *drawing_area)
{
gtk_widget_queue_draw (drawing_area);
}
Søren
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]