Wt::WTableColumn Class Reference

A column in a WTable. More...

#include <Wt/WTableColumn>

Inheritance diagram for Wt::WTableColumn:

Inheritance graph
[legend]

List of all members.

Public Member Functions

WTabletable () const
 The table to which this column belongs.
int columnNum () const
 The column number of this column in the table.
void setWidth (const WLength &width)
 Set the column width.
WLength width () const
 Get the column width.
void setStyleClass (const WString &style)
 Set the CSS style class for this column.
const WStringstyleClass () const
 Get the CSS style class for this column.
void setId (const std::string &id)
 Set the CSS Id.
virtual const std::string id () const
 Returns the (unique) identifier for this object.


Detailed Description

A column in a WTable.

A WTableColumn is returned by WTable::columnAt() and managing various properties of a single column in a table (it is however not a widget).

You cannot access table cells through the column. Instead, to access table cells, see WTable::elementAt().

A table column corresponds to the HTML <col> tag.

See also:
WTable, WTableRow

Member Function Documentation

WTable* Wt::WTableColumn::table (  )  const [inline]

The table to which this column belongs.

See also:
WTable::rowAt()

int Wt::WTableColumn::columnNum (  )  const

The column number of this column in the table.

See also:
WTable::rowAt()

void Wt::WTableColumn::setWidth ( const WLength width  ) 

Set the column width.

The default column width is WLength::Auto.

See also:
width(), WWidget::resize()

WLength Wt::WTableColumn::width (  )  const

Get the column width.

See also:
setWidth(const WLength&)

void Wt::WTableColumn::setStyleClass ( const WString style  ) 

Set the CSS style class for this column.

The style is inherited by all table cells in this column.

See also:
styleClass(), WWidget::setStyleClass()

const WString& Wt::WTableColumn::styleClass (  )  const [inline]

Get the CSS style class for this column.

See also:
styleClass(), WWidget::styleClass()

void Wt::WTableColumn::setId ( const std::string &  id  ) 

Set the CSS Id.

Sets a custom Id. Note that the Id must be unique across the whole widget tree, can only be set right after construction and cannot be changed.

See also:
WObject::id()

const std::string Wt::WTableColumn::id (  )  const [virtual]

Returns the (unique) identifier for this object.

For a WWidget, this corresponds to the id of the DOM element that represents the widget. This is not entirely unique, since a composite widget shares the same id as its implementation.

By default, the id is auto-generated, unless a custom id is set for a widget using WWidget::setId(). The auto-generated id is created by concatenating objectName() with a unique number.

See also:
WWidget::jsRef()

Reimplemented from Wt::WObject.


Generated on Tue Nov 3 15:34:33 2009 for Wt by doxygen 1.5.6