Wt: Wt::WTableCell Class Reference

Wt 3.3.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions
Wt::WTableCell Class Reference

A container widget that represents a cell in a table. More...

`#include <Wt/WTableCell>`

Inheritance diagram for Wt::WTableCell:
[legend]

List of all members.

## Public Member Functions
void | setRowSpan (int rowSpan)
| Sets the row span.
int | rowSpan () const
| Returns the row span.
void | setColumnSpan (int colSpan)
| Sets the column span.
int | columnSpan () const
| Returns the column span.
int | row () const
| Returns the row index of this cell.
int | column () const
| Returns the column index of this cell.
WTable * | table () const
| Returns the table containing this cell.
WTableRow * | tableRow () const
| Returns the table row containing this cell.
WTableColumn * | tableColumn () const
| Returns the table column containing this cell.

## Detailed Description

A container widget that represents a cell in a table.

A WTable provides a table of WTableCell container widgets. A WTableCell may overspan more than one grid location in the table, by specifying a rowSpan and columnSpan . Table cells at overspanned positions are hidden. You cannot directly create a WTableCell, instead, they are created automatically by a table.

A WTableCell acts as any other WContainerWidget, except that both the vertical and horizontal alignment of contents may be specified by setContentAlignment().

### CSS

The widget corresponds to the HTML `<td>` or `<th>` tag, depending on whether the cell is a plain cell or a header cell. The widget does not provide styling, and can be styled using inline or external CSS as appropriate.

See also:
  WTable

## Member Function Documentation

int Wt::WTableCell::columnSpan | ( |  | ) | const

Returns the column span.

See also:
  setColumnSpan(int colSpan)

int Wt::WTableCell::rowSpan | ( |  | ) | const

Returns the row span.

See also:
  setRowSpan(int rowSpan)

void Wt::WTableCell::setColumnSpan | ( | int | colSpan | ) |

Sets the column span.

The column span indicates how many table columns this WTableCell overspans. By default, a WTableCell has a column span of 1, only occupying its own grid cell. A column span greater than 1 indicates that table cells to the right of this one are overspanned.

void Wt::WTableCell::setRowSpan | ( | int | rowSpan | ) |

Sets the row span.

The row span indicates how many table rows this WTableCell overspans. By default, a WTableCell has a row span of 1, only occupying its own grid cell. A row span greater than 1 indicates that table cells below this one are overspanned.

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator