Re: forcing immediate redraw on widget



Marc Santhoff wrote:

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"?

It is both:

Setting the bg color on the hscale does work, but the changed color
shows effect only after the value of the slider is changed by mouse or
keyboard. And it does change only at the area where the slider has
been resulting in sort of a dashed line.

In this situation i decided to force the redraw for circumventing this
behaviour.

So changing the attribute (BG colour) of the GtkHScale basically works
for you but your problem is still that it doesn't get completely redrawn
immediately? So your problem is simply that the lines

    gtk_widget_queue_draw (widget_to_redraw);
    while (gtk_events_pending ())
        gtk_main_iteration ();

have no effect at all for you? You know, you have to place those lines
after(!) the location where you change the attributes of the widget,
i.e. your former code example!?



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