Skip to main content

Overview

The TIndicator class is a special column that appears as the leftmost column in a TeeGrid, displaying visual symbols to indicate the current state of each row. It shows whether a row is being browsed, edited, or is a new insert row.

Class Hierarchy

Visual Indicators

The indicator column displays different symbols based on the row state:
  • Browse - Triangle pointing right (▶) for the current row
  • Edit - Pencil icon indicating the row is being edited
  • Insert - Asterisk (*) indicating a new row being inserted

Properties

Visible

Controls whether the indicator column is visible. Default: Inherited from parent class Example:

Width

The width of the indicator column. Default: DefaultWidth (10 pixels) Example:

Format

The visual formatting (brush, stroke, font) for the indicator column. Example:

Font

The font used for indicator symbols. Example:

Constants

DefaultWidth

The default width of the indicator column in pixels.

Methods

Constructor Create

Creates a new TIndicator instance. Parameters:
  • AChanged: Event handler called when indicator properties change

Assign

Copies indicator properties from another persistent object. Parameters:
  • Source: The source object to copy from
Example:

Paint

Paints the indicator symbol for the current row state. Parameters:
  • AData: Rendering data containing painter and bounds information

TIndicatorState Enumeration

Defines the possible states for the indicator.
  • Browse - Normal browsing mode (shows triangle)
  • Edit - Row is being edited (shows pencil icon)
  • Insert - New row is being inserted (shows asterisk)

Usage Examples

Enabling the Indicator

Customizing Indicator Appearance

Hiding the Indicator

Checking Indicator State

Complete Indicator Setup

Database-Style Grid

Coordinating with Selection

Integration with Grid Operations

The indicator automatically updates its display based on grid operations:

Browse Mode

When navigating through rows without editing:
  • Shows a triangle (▶) pointing to the current row
  • Updates automatically as selection changes

Edit Mode

When editing begins (double-click, F2, or AutoEdit):
  • Indicator changes to show a pencil icon
  • Indicates the row is in edit mode

Insert Mode

When inserting a new row (for data-bound grids):
  • Indicator shows an asterisk (*)
  • Indicates a new row being added

Design Patterns

Spreadsheet-Style Grid

Database Grid Style

Report/Read-Only Style

Important Notes

The indicator column is always positioned as the leftmost column in the grid and cannot be moved or reordered.
The indicator width should be kept relatively small (10-20 pixels) to maximize space for data columns.
The indicator state (Browse, Edit, Insert) is managed internally by the grid and should not be modified directly. It updates automatically based on grid operations.

Properties Summary Table

State Symbols Reference

See Also