:right-sidebar: True BindingGroup =================================================================== .. currentmodule:: gi.repository.GObject .. versionadded:: 2.72 .. class:: BindingGroup(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.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 :obj:`~gi.repository.GObject.BindingGroup.set_source`\. Constructors ------------ .. rst-class:: interim-class .. class:: BindingGroup :no-index: .. classmethod:: new() -> ~gi.repository.GObject.BindingGroup Creates a new :obj:`~gi.repository.GObject.BindingGroup`\. .. versionadded:: 2.72 Methods ------- .. rst-class:: interim-class .. class:: BindingGroup :no-index: .. method:: bind(source_property: str, target: ~gi.repository.GObject.Object, target_property: str, flags: ~gi.repository.GObject.BindingFlags) -> None Creates a binding between ``source_property`` on the source object and ``target_property`` on ``target``\. Whenever the ``source_property`` is changed the ``target_property`` is updated using the same value. The binding flag :const:`~gi.repository.GObject.BindingFlags.SYNC_CREATE` is automatically specified. See :func:`~gi.repository.GObject.Object.bind_property` for more information. .. versionadded:: 2.72 :param source_property: the property on the source to bind :param target: the target :obj:`~gi.repository.GObject.Object` :param target_property: the property on ``target`` to bind :param flags: the flags used to create the :obj:`~gi.repository.GObject.Binding` .. method:: bind_full(source_property: str, target: ~gi.repository.GObject.Object, target_property: str, flags: ~gi.repository.GObject.BindingFlags, transform_to: ~gi.repository.GObject.Closure | None = None, transform_from: ~gi.repository.GObject.Closure | None = None) -> None Creates a binding between ``source_property`` on the source object and ``target_property`` on ``target``\, allowing you to set the transformation functions to be used by the binding. The binding flag :const:`~gi.repository.GObject.BindingFlags.SYNC_CREATE` is automatically specified. See :func:`~gi.repository.GObject.Object.bind_property_full` for more information. .. versionadded:: 2.72 :param source_property: the property on the source to bind :param target: the target :obj:`~gi.repository.GObject.Object` :param target_property: the property on ``target`` to bind :param flags: the flags used to create the :obj:`~gi.repository.GObject.Binding` :param transform_to: the transformation function from the source object to the ``target``\, or :const:`None` to use the default :param transform_from: the transformation function from the ``target`` to the source object, or :const:`None` to use the default .. method:: dup_source() -> ~gi.repository.GObject.Object | None Gets the source object used for binding properties. .. versionadded:: 2.72 .. method:: set_source(source: ~gi.repository.GObject.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``\. .. versionadded:: 2.72 :param source: the source :obj:`~gi.repository.GObject.Object`\, or :const:`None` to clear it Properties ---------- .. rst-class:: interim-class .. class:: BindingGroup :no-index: .. attribute:: props.source :type: ~gi.repository.GObject.Object The type of the None singleton. .. versionadded:: 2.72