#include <WTreeTable>
Inherits Wt::WCompositeWidget.
Inheritance diagram for Wt::WTreeTable:

Public Member Functions | |
| WTreeTable (WContainerWidget *parent) | |
| Construct a new WTreeTable. | |
| void | addColumn (const WString &header, WLength width) |
| Add a column. | |
| int | numColumns () const |
| The number of columns in this table. | |
| void | setTreeRoot (WTreeTableNode *root, const WString &header) |
| Set the tree root. | |
| WTreeTableNode * | treeRoot () const |
| Get the tree root. | |
| WLength | columnWidth (int column) const |
| Get the column width for the given column. | |
| WText * | header (int column) const |
| Get the header for the given column. | |
A WTreeTable implements a tree list, which has additional data associated with each item, which is organized in columns.
The actual data is organized and provided by WTreeTableNode objects.
To use the tree table, one should first use addColumn() to add columns, by specifying a header label, and a width. Then, the tree root must be set, and data bound with each node using WTreeTableNode::setColumnWidget().
| Wt::WTreeTable::WTreeTable | ( | WContainerWidget * | parent | ) |
Construct a new WTreeTable.
The treeRoot() is 0. The table should first be properly dimensioned using addColumn() calls, and then data using setTreeRoot().
Add a column.
Add a column, by specifying a header and a column width.
| WLength Wt::WTreeTable::columnWidth | ( | int | column | ) | const [inline] |
Get the column width for the given column.
The width of the first column (with index 0), containing the tree, is implied by the width set for the table minus the width of all other columns.
| int Wt::WTreeTable::numColumns | ( | ) | const [inline] |
The number of columns in this table.
Returns the number of columns in the table, including in the count the first column which contains the tree.
| void Wt::WTreeTable::setTreeRoot | ( | WTreeTableNode * | root, | |
| const WString & | header | |||
| ) |
Set the tree root.
Sets the data for the tree table, and specify the header for the first column.
1.4.7