9.3.1 Setting the Update Policy

The "update policy" of a range widget defines at what points during user interaction it will change the value field of its Adjustment and emit the "value_changed" signal on this Adjustment. The update policies are:

Gtk::UPDATE_CONTINUOUS

This is the default. The "value_changed" signal is emitted continuously, i.e. whenever the slider is moved by even the tiniest amount.

Gtk::UPDATE_DISCONTINUOUS

The "value_changed" signal is emitted once the slider has stopped moving and the user has released the mouse button.

Gtk::UPDATE_DELAYED

The "value_changed" signal is emitted when the user releases the mouse button, or if the slider stops moving for a short period of time.

The update policy of a range widget can be set by using:

Gtk::Range#set_update_policy( update_policy )
Gtk::Range#update_policy=( update_policy )

Prev Next