TableCreator
From AbiWiki
(Difference between revisions)
MartinSevior (Talk | contribs) (→==) |
MartinSevior (Talk | contribs) (→==) |
||
Line 34: | Line 34: | ||
</pre> | </pre> | ||
- | ==== Contributors | + | ==== Contributors ==== |
==== | ==== | ||
* Main.[[MartinSevior|MartinSevior]] - 27 Jan 2007 | * Main.[[MartinSevior|MartinSevior]] - 27 Jan 2007 | ||
[[Category:To Convert]] | [[Category:To Convert]] |
Revision as of 13:43, 19 July 2009
Contents |
TableCreator
This wraps the useful little widget TableCreator, which can be used to interactively insert a table into a document by dragging the mouse. This widget is normally embedded in a Toolbar.
Example Code
Some simple example code to show to use the widget in python. In the _init method used to create a toolbar add the following code..
self._tableCreate = abiword.TableCreator() self._tableCreate.set_labels("Table","Cancel") self._tableCreate.show() self._tableItem = gtk.ToolItem() self._tableItem.add(self._tableCreate) self.insert(self._tableItem, -1) self._tableItem.show_all() self._tableCreate.connect("selected",self._tableCB) self._tableCreate.label().hide()
Then add the callback
def _tableCB(self,abi,rows,cols): self._abiword_canvas.insert_table(rows,cols)
Contributors
==
- Main.MartinSevior - 27 Jan 2007