Skip to content

Gtk.CellAreaBox

class — extends CellArea, Buildable, CellLayout, Orientable

:::warning Deprecated since 4.10 This API is deprecated. :::

A cell area that renders GtkCellRenderers into a row or a column

The GtkCellAreaBox renders cell renderers into a row or a column depending on its GtkOrientation.

GtkCellAreaBox uses a notion of packing. Packing refers to adding cell renderers with reference to a particular position in a GtkCellAreaBox. There are two reference positions: the start and the end of the box. When the GtkCellAreaBox is oriented in the Orientation.VERTICAL orientation, the start is defined as the top of the box and the end is defined as the bottom. In the Orientation.HORIZONTAL orientation start is defined as the left side and the end is defined as the right side.

Alignments of GtkCellRenderers rendered in adjacent rows can be configured by configuring the GtkCellAreaBox align child cell property with CellArea.cell_set_property or by specifying the "align" argument to CellAreaBox.pack_start and CellAreaBox.pack_end.

Constructors

new

@classmethod
def new(cls) -> CellArea

:::warning Deprecated since 4.10 This API is deprecated. :::

Creates a new GtkCellAreaBox.

Methods

get_spacing

def get_spacing(self) -> int

:::warning Deprecated since 4.10 This API is deprecated. :::

Gets the spacing added between cell renderers.

pack_end

def pack_end(self, renderer: CellRenderer, expand: bool, align: bool, fixed: bool) -> None

:::warning Deprecated since 4.10 This API is deprecated. :::

Adds renderer to box, packed with reference to the end of box.

The renderer is packed after (away from end of) any other GtkCellRenderer packed with reference to the end of box.

Parameters:

  • renderer — the GtkCellRenderer to add
  • expand — whether renderer should receive extra space when the area receives more than its natural size
  • align — whether renderer should be aligned in adjacent rows
  • fixed — whether renderer should have the same size in all rows

pack_start

def pack_start(self, renderer: CellRenderer, expand: bool, align: bool, fixed: bool) -> None

:::warning Deprecated since 4.10 This API is deprecated. :::

Adds renderer to box, packed with reference to the start of box.

The renderer is packed after any other GtkCellRenderer packed with reference to the start of box.

Parameters:

  • renderer — the GtkCellRenderer to add
  • expand — whether renderer should receive extra space when the area receives more than its natural size
  • align — whether renderer should be aligned in adjacent rows
  • fixed — whether renderer should have the same size in all rows

set_spacing

def set_spacing(self, spacing: int) -> None

:::warning Deprecated since 4.10 This API is deprecated. :::

Sets the spacing to add between cell renderers in box.

Parameters:

  • spacing — the space to add between GtkCellRenderers

Properties

spacing

spacing: int  # read/write

The amount of space to reserve between cells.