goocanvas.TextModel — A model for text items.
class goocanvas.TextModel(goocanvas.ItemModelModelSimple): |
|
goocanvas.TextModel
represents a text item. It is a subclass of
goocanvas.ItemModelModelSimple
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()
goocanvas.TextModel(properties
=None)
| A comma separated list of properties. |
Returns: | A new
goocanvas.TextModel
|
Creates a new canvas text model item.
Here's an example showing how to create a text model item with the bottom right of the text box placed at (500,500):
text = goocanvas.TextModel(parent=root, string="Hello, World!", x=500, y=500, width=200, anchor=gtk.ANCHOR_SE, fill_color="blue")