Re: forcing immediate redraw on widget



Marc Santhoff wrote:

Thank you for answering, although after testing this seems to be
only one half of the solution.

The other half would be to invalidate or mark the widget for
redrawing, so that there are events to process. Apparently
changing the background color on a widget (hscale in this case)
does not do it.

Have you included the first half (the call to gtk_widget_queue_draw
()) into your test? Just changing simple attributes isn't enough
indeed to force a widget to be redrawn. gtk_widget_queue_draw () is
supposed to do excatly what you were suggesting: invalidate the the
widget for

Yes, i saw that too late. I should have written that it does not work
as expected.

[...]

After this I've tried several methods of getting the change visible,
starting without or with a definition in an rc file for testing what
color setting looks good on the hscale.

If there is an other way of changing this color I would be glad, but I
could not find a way to switch the style of a widget between to
rc-file definitons.

Your latest description sounds like a different problem than the one I
understood and tried to help you with. Am I right that your actual
problem isn't just to redraw the widget *immediately* but rather to
redraw the widget with a changed appearance *at all*? In this case for a
GtkHScale? So your problem is actually "how to change the appearance of
a GtkHScale" and not "how to immediately redraw a widget"?



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