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_property
on the source object andtarget_property
ontarget
. Whenever thesource_property
is changed thetarget_property
is updated using the same value. The binding flagSYNC_CREATE
is 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: Callable[[...], Any] | None = None, transform_from: Callable[[...], Any] | None = None) None #
Creates a binding between
source_property
on the source object andtarget_property
ontarget
, allowing you to set the transformation functions to be used by the binding. The binding flagSYNC_CREATE
is 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
Object
target_property – the property on
target
to bindflags – the flags used to create the
Binding
transform_to – the transformation function from the source object to the
target
, orNone
to use the defaulttransform_from – the transformation function from the
target
to the source object, orNone
to 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
source
as 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
, orNone
to clear it