goocanvas.TableModel

goocanvas.TableModel — A model for a table container to layout items.

Synopsis

class goocanvas.TableModel(goocanvas.GroupModel):
    goocanvas.TableModel(properties=None)

Ancestry

+-- gobject.GObject
	+-- goocanvas.ItemModelModelSimple
		+-- goocanvas.GroupModel
			+-- goocanvas.TableModel

goocanvas.TableModel Properties

"column-spacing"Read/WriteThe default space between columns. Allowed values: >= 0 Default value: 0
"height"Read/WriteThe requested height of the table, or -1 to use the default height. Default value: -1
"homogeneous-columns"Read/WriteIf all columns are the same width. Default value: False
"homogeneous-rows"Read/WriteIf all rows are the same height. Default value: False
"row-spacing"Read/WriteThe default space between rows. Allowed values: >= 0 Default value: 0
"width"Read/WriteThe requested width of the table, or -1 to use the default width. Default value: -1

goocanvas.TableModel Child Properties

"bottom-padding"Read/WriteExtra space to add below the item. Allowed values: >= 0 Default value: 0.
"column"Read/WriteThe column to place the item in. Allowed values: <= 65535 Default value: 0.
"columns"Read/WriteThe number of columns that the item spans. Allowed values: <= 65535 Default value: 1.
"left-padding"Read/WriteExtra space to add to the left of the item. Allowed values: >= 0 Default value: 0.
"right-padding"Read/WriteExtra space to add to the right of the item. Allowed values: >= 0 Default value: 0.
"row"Read/WriteThe row to place the item in. Allowed values: <= 65535 Default value: 0.
"rows"Read/WriteThe number of rows that the item spans. Allowed values: <= 65535 Default value: 1.
"top-padding"Read/WriteExtra space to add above the item. Allowed values: >= 0 Default value: 0.
"x-align"Read/WriteThe 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/WriteIf the item expands horizontally as the table expands. Default value: False.
"x-fill"Read/WriteIf the item fills all horizontal allocated space. Default value: False.
"x-shrink"Read/WriteIf the item can shrink smaller than its requested size horizontally. Default value: False.
"y-align"Read/WriteThe 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/WriteIf the item expands vertically as the table expands. Default value: False.
"y-fill"Read/WriteIf the item fills all vertical allocated space. Default value: False.
"y-shrink"Read/WriteIf the item can shrink smaller than its requested size vertically. Default value: False.

Implemented Interfaces

goocanvas.TableModel implements goocanvas.ItemModel

Description

goocanvas.TableModel 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.TableModel is a subclass of goocanvas.ItemModelSimple and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width". Setting a style property on a goocanvas.TableModel will affect all children of the goocanvas.TableModel (unless the children override the property setting).

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

Constructor

    goocanvas.TableModel(properties=None)

properties:

A comma separated properties as **kwargs.

Returns:

A new goocanvas.TableModel

Creates a new canvas table model item.