goocanvas.GridModel — A model for grid items.
|
goocanvas.GridModel represents a model for grid items.
It is a subclass of goocanvas.ItemModelSimple
and so inherits all of the style properties such as "stroke-color", "fill-color" and "line-width".
It also implements the goocanvas.ItemModel
interface, so you can use the goocanvas.ItemModel
functions such as goocanvas.ItemModel.raise_()
and goocanvas.ItemModel.rotate().
To respond to events such as mouse clicks on the ellipse you must connect to the signal handlers
of the corresponding goocanvas.Grid
objects. (See get_item and
GooCanvas::item-created.)
goocanvas.GridModel(properties=None)
| A comma separated list of properties. |
Returns : | A new
goocanvas.GridModel
|
Creates a new canvas grid model.
Here's an example showing how to create a grid model:
grid = goocanvas.GridModel(parent=root,
x=100,
y=100,
width=400,
height=200,
x_step=20,
Y_step=20,
x_offset=10,
y_offset=10,
horz_grid_line_width=4.0,
horz_grid_line_color="yellow",
vert_grid_line_width=2.0,
vert_grid_line_color="red",
border_width=3.0,
border_color="white",
fill_color="blue"
)