bind_writable


Description:

[ Version ( since = "2.26" ) ]
public void bind_writable (string key, Object object, string property, bool inverted)

Create a binding between the writability of key in the this object and the property property of object.

The property must be boolean; "sensitive" or "visible" properties of widgets are the most likely candidates.

Writable bindings are always uni-directional; changes of the writability of the setting will be propagated to the object property, not the other way.

When the inverted argument is true, the binding inverts the value as it passes from the setting to the object, i.e. property will be set to true if the key is not writable.

Note that the lifecycle of the binding is tied to object, and that you can have only one binding per object property. If you bind the same property twice on the same object, the second binding overrides the first one.

Parameters:

this

a Settings object

key

the key to bind

object

a Object

property

the name of a boolean property to bind

inverted

whether to 'invert' the value