Question about scrollbars



Hi.

I'm using a GtkLayout in a GtkScrolledWindow, and the area size as
well as the adjustment values of the GtkLayout are changed quite
often by the program itself. However, I need to catch adjustment
changes by *the user* (by using the scrollbars), and distinguish them
from changes caused by my program.

Currently, I connect a callback to the "value_changed" signal of the
adjustments, and keep track where changes come from, by
increasing/decreasing a counter before/after my program may affect
the adjustments. A zero value of this counter should indicate an user
caused change. But this turned out to be quite tricky, and I did not
get it working in all cases. So I ask if there is a more direct way
to notice changes of the scrollbars.

Thanks in advance,
Sebastian




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