# GimpUi.ChainButton

    from gi.repository import GimpUi

    chain_button = GimpUi.ChainButton(active=value, icon_size=value, position=value)

This widget provides a button showing either a linked or a broken chain that can be used to link two entries, spinbuttons, colors or other GUI elements and show that they may be locked. Use it for example to connect X and Y ratios to provide the possibility of a constrained aspect ratio.

The GimpUi.ChainButton only gives visual feedback, it does not really connect widgets. You have to take care of locking the values yourself by checking the state of the GimpUi.ChainButton whenever a value changes in one of the connected widgets and adjusting the other value if necessary.

## Hierarchy

- GObject.Object
  - GObject.InitiallyUnowned
    - Gtk.Widget
      - Gtk.Container
        - Gtk.Grid
          - GimpUi.ChainButton

## Methods

- GimpUi.ChainButton.get_active
- GimpUi.ChainButton.get_button
- GimpUi.ChainButton.get_icon_size
- GimpUi.ChainButton.set_active
- GimpUi.ChainButton.set_icon_size

## Properties

- active
- icon-size
- position

## Signals

- toggled