accessMode
Type: Integer
Availability: Read or write at run time
The accessMode property provides multiple meanings for the alignment, backColor, comboIndex, foreColor, fontName, fontSize, fontBold, fontItalic, fontUnderline, fontStrikethru, inputType, maxLength, partialTextIndication, and wordWrap properties of Table controls.
The accessMode property enables table cells to have different colors, fonts, alignments, and input modes. The values of the accessMode property are listed in the following table.
Table Class Constant | Value | Contains the … |
---|---|---|
AccessMode_Sheet | 0 | Default value for the current sheet. The default value is that initially set for the table at development time or the current sheet for added additional sheets. |
AccessMode_Cell | 1 | Effective value for the current cell of the current sheet. |
AccessMode_Column | 2 | Default value for the current column of the current sheet. |
AccessMode_Row | 3 | Default value for the current row of the current sheet. |
The font setting for value AccessMode_Sheet (0) applies to all sheets in the table. Set the accessMode property to AccessMode_Cell (1), AccessMode_Column (2), or AccessMode_Row (3), to cause the values to be returned for the current cell, current column, or current row respectively, reflected by the row, column, or sheet property.
You can directly access a table element using an instance of the
When the Table control obtains the value of one of the properties affected by accessMode for a cell, the following rules apply when retrieving the value of that property.
-
If the cell value is specifically set, that value is returned.
-
If the cell value is not set, the value of the column is returned if that is set.
-
If the column value is not set, the value of the row is returned if that is set.
-
If the row value is not set, the default value for the sheet is returned.
The value returned when the accessMode property is set to AccessMode_Cell (1) is the effective value of that property for the current cell.
Cells in the fixed part of a column have the backColor and inputType properties set only if those properties are specifically set for a cell or the fixed column.
The default value is AccessMode_Sheet (0); that is, changing any of these properties affects the default values for the current sheet of the table. Each cell of its owner sheet uses these default values.
The code fragment in the following example shows the use of the accessMode property.
table1.accessMode := Table.AccessMode_Sheet; table1.alignment := Table.Alignment_Right; table1.column := 1; table1.accessMode := Table.AccessMode_Column; table1.alignment := Table.Alignment_Left;
See also the Table class accessedCell, accessedColumn, accessedRow, and accessedSheet properties.