Pike v8.1 release 6

Method GTK2.SpinButton()->set_update_policy()


Method set_update_policy

GTK2.SpinButton set_update_policy(int policy)

Description

The possible values of policy are either GTK2.UpdateAlways or GTK2.UpdateIfValid.

These policies affect the behavior of a Spin Button when parsing inserted text and syncing its value with the values of the Adjustment.

In the case of GTK2.UpdateIfValid the Spin Button value only gets changed if the text input is a numeric value that is within the range specified by the Adjustment. Otherwise the text is reset to the current value.

In case of GTK2.UpdateAlways errors are ignored while converting text into a numeric value.