org.gnome.gtk

## Class AttachOptions

- Object
- - org.freedesktop.bindings.Constant
  - - org.gnome.gtk.AttachOptions

-     public final class AttachOptions
      extends org.freedesktop.bindings.Constant

  Using AttachOptions you control how a Widget placed in a `Table` uses eventually existing additional space, e.g. because another cell in the same row is much wider or another column much higher.

  It may be necessary to encapsulate your attached Widget in an `Alignment` container. This could look like this:

       Table table;
       ...
       TextEntry number = new TextEntry();
       number.setWidthChars(4);
       Alignment alignNumber = new Alignment(Alignment.LEFT, Alignment.CENTER, 0,0, number);
       table.attach(alignNumber, 1, 2, 1, 2, AttachOptions.FILL, AttachOptions.SHRINK, 0,0);

  Since:
    4.0.10

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static AttachOptions` | `EXPAND` Like FILL, but also causes the cell to expand and use extra space.
    `static AttachOptions` | `FILL` The widget gets all the available space.
    `static AttachOptions` | `SHRINK` Although there is additional space available, the Widget shall keep its size or even shrink if possible.

  - ### Method Summary

    - ### Methods inherited from class org.freedesktop.bindings.Constant

      `toString`

    - ### Methods inherited from class Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### EXPAND

          public static final AttachOptions EXPAND

      Like FILL, but also causes the cell to expand and use extra space.

    - #### FILL

          public static final AttachOptions FILL

      The widget gets all the available space. Unless you put the widget inside an `Alignment` container, the Widget is resized to fill the space. If you do use Alignment containers the Widget itself will not grow, but keep its size while the container controls where it resides.

    - #### SHRINK

          public static final AttachOptions SHRINK

      Although there is additional space available, the Widget shall keep its size or even shrink if possible. This usually gets the extra space distributed evenly among the widget, so you have the Widget centered in the extra space.

      Encapsulating the Widget in an `Alignment` container does not help, since the Alignment container only gets the same space granted the shrinked Widget would get.