Re: refreshing a drawing area when a spinbutton is used.



Thanks Vincent,

But how do I get the pointer to the drawing area? The signal is being emitted by the spin button, and as such the widget I have a pointer to is that of the spin button. Can I use the same pointer I used when creating the drawing area?

eg. darea = gtk_drawing_area_new();

If darea is a global variable, will it still point to the drawing area after the gtk_main() loop starts? I cant check this right at the moment since I am at work and there is a significant lack of Linux boxes here. Is there a nice function that will return a pointer to an arbitrary widget, or a way to travel up to the parent and then down to the drawing area to get its pointer? Am I making this too complicated?

Best regards,

Chris.

you can try
void gtk_widget_queue_draw_area (GtkWidget *widget, gint x, gint y, gint
width, gint height);

to force the "expose-event" to be emitted.

regards

Vincent TORRI


_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus




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