TEgFireGrid works on Windows (32 and 64-bit) and Android
(32 and 64-bit). The same form and the same code serve both; where the
behaviour differs (touch, the virtual keyboard, the Back key), the grid
follows each platform’s conventions by itself. See Selection, keyboard and
touch.
The grid has no style file of its own: it is drawn with the resources
of the active FireMonkey style, the same ones the stock
TGrid uses (the grid background, the title bar, the check
box, the selection colour). It therefore matches any style, stock or
custom, light or dark, including a style changed while the application
runs.
A few things are adjusted so every style works:
Colours of your own are drawn over the style: Color and Color for
the cells, TitleColor
and TitleColor
for the titles (as a tint, since the title background belongs to the
style), and per cell in OnBeforeDrawCell.
A fixed colour chosen for one style can be unreadable in another: test
them with every style the application offers.
By default the cells and the titles use the style’s font and text
colour, which are the right ones for the platform and the style. The
grid’s Font, TitleFont, FontColor and
TitleFontColor,
and the same properties of each column, replace them; but only:
Font is not
applied: see FontAssigned),
andApplyCustomFontOnDesktop
(Windows) or ApplyCustomFontOnMobile
(Android) is True. Both are False by
default.This lets one form keep the native look on one platform and use its
own font on the other, for example a larger font on the phone only. The
subtitle’s font and colour, and the colour and font style an OnBeforeDrawCell
handler gives a cell, are always applied. The in-place editors always
use the style’s font.
Sizes (widths, heights, font sizes) are in FireMonkey units, which
the platform scales to its screen density. The grid lays out its rows
and columns on whole device pixels, so the lines between cells stay
sharp; the values in use may differ from the properties by a fraction of
a unit. The rows keep a fixed RowHeight, and
the title row keeps the style’s height unless HeaderHeight
is set: neither grows with the font or with wrapped text.