goocanvas.Table
Prev | PyGooCanvas Standard Canvas Items Reference | Next

## goocanvas.Table

goocanvas.Table — A table container to layout items.

## Synopsis

    class goocanvas.Table(goocanvas.Group):
        goocanvas.Table(properties=None)

## Ancestry

    +-- gobject.GObject
    	+-- goocanvas.ItemSimple
    		+-- goocanvas.Group
    			+-- goocanvas.Table

## goocanvas.Table Properties

"column-spacing" | Read/Write | The default space between columns. Allowed values: >= 0 Default value: 0
"height" | Read/Write | The requested height of the table, or -1 to use the default height. Default value: -1
"homogeneous-columns" | Read/Write | If all columns are the same width. Default value: False
"homogeneous-rows" | Read/Write | If all rows are the same height. Default value: False
"horiz-grid-line-width" | Read/Write | The width of the grid line to draw between rows. Allowed values: >= 0. Default value: 0.
"row-spacing" | Read/Write | The default space between rows. Allowed values: >= 0 Default value: 0
"vert-grid-line-width" | Read/Write | The width of the grid line to draw between columns. Allowed values: >= 0. Default value: 0.
"width" | Read/Write | The requested width of the table, or -1 to use the default width. Default value: -1
"x-border-spacing" | Read/Write | The amount of spacing between the lefmost and rightmost cells and the border grid line. Allowed values: >= 0. Default value: 0.
"y-border-spacing" | Read/Write | The amount of spacing between the topmost and bottommost cells and the border grid line. Allowed values: >= 0. Default value: 0.

## goocanvas.Table Child Properties

"bottom-padding" | Read/Write | Extra space to add below the item. Allowed values: >= 0 Default value: 0.
"column" | Read/Write | The column to place the item in. Allowed values: <= 65535 Default value: 0.
"columns" | Read/Write | The number of columns that the item spans. Allowed values: <= 65535 Default value: 1.
"left-padding" | Read/Write | Extra space to add to the left of the item. Allowed values: >= 0 Default value: 0.
"right-padding" | Read/Write | Extra space to add to the right of the item. Allowed values: >= 0 Default value: 0.
"row" | Read/Write | The row to place the item in. Allowed values: <= 65535 Default value: 0.
"rows" | Read/Write | The number of rows that the item spans. Allowed values: <= 65535 Default value: 1.
"top-padding" | Read/Write | Extra space to add above the item. Allowed values: >= 0 Default value: 0.
"x-align" | Read/Write | The horizontal position of the item within its allocated space. 0.0 is left-aligned, 1.0 is right-aligned. Allowed values: [0,1] Default value: 0.5.
"x-expand" | Read/Write | If the item expands horizontally as the table expands. Default value: False.
"x-fill" | Read/Write | If the item fills all horizontal allocated space. Default value: False.
"x-shrink" | Read/Write | If the item can shrink smaller than its requested size horizontally. Default value: False.
"y-align" | Read/Write | The vertical position of the item within its allocated space. 0.0 is top-aligned, 1.0 is bottom-aligned. Allowed values: [0,1] Default value: 0.5.
"y-expand" | Read/Write | If the item expands vertically as the table expands. Default value: False.
"y-fill" | Read/Write | If the item fills all vertical allocated space. Default value: False.
"y-shrink" | Read/Write | If the item can shrink smaller than its requested size vertically. Default value: False.

## Implemented Interfaces

`goocanvas.Table` implements `goocanvas.Item`

## Description

`goocanvas.Table` is a table container used to lay out other canvas items. It is used in a similar way to how the GtkTable widget is used to lay out GTK+ widgets.

Items are added to the table using the normal methods, then `set_child_properties` s used to specify how each child item is to be positioned within the table (i.e. which row and column it is in, how much padding it should have and whether it should expand or shrink).

`goocanvas.Table` is a subclass of `goocanvas.ItemSimple` and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width". Setting a style property on a `goocanvas.Table` will affect all children of the `goocanvas.Table` (unless the children override the property setting).

`goocanvas.Table` implements the `goocanvas.Item` nterface, so you can use the `goocanvas.Item` functions such as `raise_` and `rotate`, and the properties such as "visibility" and "pointer-events".

## Constructor

        goocanvas.Table(properties=None)

`properties` : | A comma separated properties as **kwargs.
Returns : | A new `goocanvas.Table`

Creates a new canvas table item.

Prev | Up | Next
goocanvas.Text | Home | goocanvas.Widget