Overview
TheTIndicator 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
Width
DefaultWidth (10 pixels)
Example:
Format
Font
Constants
DefaultWidth
Methods
Constructor Create
TIndicator instance.
Parameters:
AChanged: Event handler called when indicator properties change
Assign
Source: The source object to copy from
Paint
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.
Properties Summary Table
State Symbols Reference
See Also
- TGridSelection - Cell selection management
- TGridEditing - Cell editing configuration
- TGridBands - Grid bands for headers and footers
- TColumn - Column configuration
