Windows Dev Center

Expand Minimize

TableColumnHeader Element (Format)

Defines the label, the width of the column, and the alignment of the label for a column of the table.

<TableColumnHeader>
  <Label>DisplayedLabel</Label>
  <Width>NumberOfCharacters</Width>
  <Alignment>Left, Right, or Centered</Alignment>
</TableColumnHeader>

The following sections describe attributes, child elements, and the parent element of the TableColumnHeader element.

Attributes

None.

Child Elements

 

Element Description

Label Element for TableColumnHeader for TableControl (Format)

Optional element.

Defines the label that is displayed at the top of the column. If no label is specified, the name of the property whose value is displayed in the rows is used.

Width Element for TableColumnHeader for TableControl (Format)

Required element.

Specifies the width (in characters) of the column.

Alignment Element for TableColumnHeader for TableControl (Format)

Optional element.

Specifies how the label of the column is displayed. If no alignment is specified, the label is aligned on the left.

Parent Elements

 

Element Description

TableHeaders Element (Format)

Defines the columns of a table view.

Specify a header for each column of the table. The columns are displayed in the order in which the TableColumnHeader elements are defined.

A table must have the same number of TableColumnHeader elements as TableRowEntry elements. The column header defines how the text at the top of the table is displayed. The row entries define what data is displayed in the rows of the table.

For more information about the components of a table view, see Creating a Table View.

The following example shows two TableColumnHeader elements. The first element defines a column whose label is "Column 1", has a width of 16 characters, and whose label is aligned on the left. The second element defines a column whose label is "Column 2", has a width of 10 characters, and whose label is centered in the column.

<TableHeaders>
  <TableColumnHeader>
    <Label>Column 1</Label)
    <Width>16</Width>
    <Alignment>Left</Alignment>
  </TableColumnHeader>
    <TableColumnHeader>
    <Label>Column 2</Label)
    <Width>10</Width>
    <Alignment>Centered</Alignment>
  </TableColumnHeader>
</TableHeaders>



Show:
© 2015 Microsoft