Wt::WTable Class Reference

A container widget which provides layout of children in a table grid. More...

#include <Wt/WTable>

Inheritance diagram for Wt::WTable:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 WTable (WContainerWidget *parent=0)
 Construct an empty table.
 ~WTable ()
 Delete the table and its entire contents.
WTableCellelementAt (int row, int column)
 Access the table element at the given row and column.
WTableRowrowAt (int row)
 Get the row object for the given row.
WTableColumncolumnAt (int column)
 Get the column object for the given column.
void removeCell (WTableCell *item)
 Delete the given table cell and its contents.
void removeCell (int row, int column)
 Delete the table cell at the given position.
void insertRow (int row)
 Insert an empty row.
void deleteRow (int row)
 Delete the given row and all its contents.
void insertColumn (int column)
 Insert an empty column.
void deleteColumn (int column)
 Delete the given column and all its contents.
void clear ()
 Clear the entire table.
int numRows () const
 The number of rows in the table (deprecated).
int rowCount () const
 Returns the number of rows in the table.
int numColumns () const
 The number of columns in the table (deprecated).
int columnCount () const
 Returns the number of columns in the table.


Detailed Description

A container widget which provides layout of children in a table grid.

WTable is a stacked widget.

A WTable provides a way to manage the lay-out of children differently from the default inline or stacked layout of a WContainerWidget, by using a grid.

Access to the contents of a WTable happens through WTableCell widgets. Use elementAt(int row, int column) to access the cell at a particular position in the table. The WTable automatically resizes when necessary.

It is possible to insert and delete entire rows or columns from the table using the insertColumn(int column), insertRow(int row), deleteColumn(int column), or deleteRow(int row) methods.

See also:
WTableCell, WTableRow, WTableColumn

Member Function Documentation

WTableCell * Wt::WTable::elementAt ( int  row,
int  column 
)

Access the table element at the given row and column.

If the row/column is beyond the current table dimensions, then the table is expanded automatically.

WTableRow * Wt::WTable::rowAt ( int  row  ) 

Get the row object for the given row.

Like with elementAt(), the table expands automatically when the row is beyond the current table dimensions.

See also:
elementAt(int, int), columnAt(int)

WTableColumn * Wt::WTable::columnAt ( int  column  ) 

Get the column object for the given column.

Like with elementAt(), the table expands automatically when the column is beyond the current table dimensions.

See also:
elementAt(int, int), rowAt(int)

void Wt::WTable::removeCell ( WTableCell item  ) 

Delete the given table cell and its contents.

The table cell at that position is recreated.

void Wt::WTable::removeCell ( int  row,
int  column 
)

Delete the table cell at the given position.

See also:
removeCell(WTableCell)

void Wt::WTable::deleteRow ( int  row  ) 

Delete the given row and all its contents.

Rows below the given row are shifted up.

int Wt::WTable::numRows (  )  const

The number of rows in the table (deprecated).

Deprecated:
Use rowCount() instead.

int Wt::WTable::numColumns (  )  const

The number of columns in the table (deprecated).

Deprecated:
Use columnCount() instead.


Generated on Mon Jan 26 14:14:11 2009 for Wt by doxygen 1.5.6