BindingGroup#
Added in version 2.72.
Superclasses: Object
GBindingGroup can be used to bind multiple properties
from an object collectively.
Use the various methods to bind properties from a single source
object to multiple destination objects. Properties can be bound
bidirectionally and are connected when the source object is set
with set_source.
Constructors#
- class BindingGroup
- classmethod new() BindingGroup#
Creates a new
BindingGroup.Added in version 2.72.
Methods#
- class BindingGroup
- bind(source_property: str, target: Object, target_property: str, flags: BindingFlags) None#
Creates a binding between
source_propertyon the source object andtarget_propertyontarget. Whenever thesource_propertyis changed thetarget_propertyis updated using the same value. The binding flagSYNC_CREATEis automatically specified.See
bind_property()for more information.Added in version 2.72.
- bind_full(source_property: str, target: Object, target_property: str, flags: BindingFlags, transform_to: Closure | None = None, transform_from: Closure | None = None) None#
Creates a binding between
source_propertyon the source object andtarget_propertyontarget, allowing you to set the transformation functions to be used by the binding. The binding flagSYNC_CREATEis automatically specified.See
bind_property_full()for more information.Added in version 2.72.
- Parameters:
source_property – the property on the source to bind
target – the target
Objecttarget_property – the property on
targetto bindflags – the flags used to create the
Bindingtransform_to – the transformation function from the source object to the
target, orNoneto use the defaulttransform_from – the transformation function from the
targetto the source object, orNoneto use the default
- dup_source() Object | None#
Gets the source object used for binding properties.
Added in version 2.72.
- set_source(source: Object | None = None) None#
Sets
sourceas the source object used for creating property bindings. If there is already a source object all bindings from it will be removed.Note that all properties that have been bound must exist on
source.Added in version 2.72.
- Parameters:
source – the source
Object, orNoneto clear it