Class: TEgColumn
Declared in: EgDBGridEx
TColumn descendant used for every column of a TEgDBGridEx grid. Adds
properties that let an individual column override nineteen grid-wide
behaviors and mirror all ten of the grid’s events, plus its own image
index/alignment and sub-title properties, which have no grid-wide
equivalent.
Nineteen properties and all ten events below are live-tracking
overrides of an identically-named TEgDBGridEx member -
each has its own page, which states the mirrored behavior briefly and
links back to the grid-wide page for the full explanation. The other
seven properties (AssignedValues,
ImageAlignment,
ImageIndex,
SubTitle, SubTitleFont,
TitleImageAlignment,
TitleImageIndex)
and the three methods have no grid-wide equivalent.
ImageIndex and
TitleImageIndex
seed the image shown in a column’s data cells and title cell, from the
grid’s Images
list, before OnBeforeDrawCell
/ OnBeforeDrawTitle
run - either event can still freely raise, lower, or clear whatever
these properties seeded. ImageAlignment
and TitleImageAlignment
position that image independently of the column’s own text
alignment.
OnTitleImageClick
fires when a click lands specifically on this column’s title image,
mirroring the grid’s own OnTitleImageClick
(which runs first when both are assigned). Requires TitleImageIndex
to actually be set.
OnCellImageClick
fires when a click lands specifically on this column’s data-cell
ImageIndex icon, mirroring the grid’s own OnCellImageClick
(which runs first when both are assigned) - instead of the native
OnCellClick, not alongside it. See the grid-level event for
the full scope and gating rules (ImageOnSelectedOnly
/ ShowImageOnEmpty).
Nineteen properties - CellVAlign, CellWordWrap,
CheckFrames,
CheckKind, ClickableCursor,
ClicksOnRowSelect,
DetectBlobImages,
EditColor, ExtendedStrEditor,
ImageOnSelectedOnly,
MemoMaxChars,
MinFontSize,
ShowImageOnEmpty,
ShowImageOverGraphic,
ShrinkFontToFit,
UseColorOnStyles,
UseFixedColorOnStyles,
UseFixedFontColorOnStyles,
and UseFontColorOnStyles
- each mirror the grid-wide property of the same name but can be
overridden per column. A column left at its default follows the grid
live, the same way Vcl.DBGrids.TColumn’s own
AssignedValues tracks its native overrides; the read-only
AssignedValues
property on TEgColumn reports which of the nineteen are
currently overridden on that column. ClickableCursor is the
one exception worth calling out: a column’s own override only ever
affects that column’s data cells (checkbox, ImageIndex
icon) - its title (sort arrow, title image) always follows the
grid-level ClickableCursor directly, never the column’s
override.
Eight further events - OnCheckChange,
OnBeforeDrawCell,
OnBeforeDrawTitle,
OnCellDblClick,
OnTitleCellClick,
OnGraphicError,
OnCellRightClick,
and OnTitleCellRightClick
- are also available per column, alongside the grid-wide event of the
same name; both fire when assigned, grid first, so a column’s own
handler can react to or override whatever the grid-wide handler already
decided.
SubTitle
adds an optional second line below Title.Caption, drawn
with this column’s own SubTitleFont.
Has no grid-wide equivalent - it is purely a per-column addition, not an
override of anything TEgDBGridEx itself has. See
SubTitle’s own page for the row- height and layout details,
and TitleRowHeightPx
for the one combination that is not supported.
Create seeds
ImageIndex/
TitleImageIndex
to -1 and ImageAlignment/
TitleImageAlignment/
Title.Alignment to their documented defaults. Assign copies this
unit’s own additions between columns (only the nineteen overridable
properties actually set on the source, per its
AssignedValues), and RestoreDefaults
clears every one of them back to “follow the grid”, as if the column had
just been created.