Hello,
This look trivial but I don't know have to change TmsFmxGrid/TmsFmxLiveGrid header font ?
Hi,
Hi Pieter,
How does it works when grid is linked via livebindings ?
Columns linked via livebinding view are different from TMSFMXGrid columns collection.
I have tried this (on forms create handler) but font size is unchanged.
TMSFMXGrid1.FontSizes[0, 0] := 128;
TMSFMXGrid1.FontSizes[1, 0] := 128;
TMSFMXGrid1.FontSizes[2, 0] := 128;
TMSFMXGrid1.FontSizes[3, 0] := 128;
We have investigated this here, and the font size is changed when using the following code on an empty default grid:
When dataset is closed and opened again, all grid column configuration is lost.
I'm doing this now
TMSFMXGrid1.BeginUpdate;
for i := 0 to TMSFMXGrid1.RowCount - 1 do
begin
for j := 0 to TMSFMXGrid1.ColumnCount do
TMSFMXGrid1.FontSizes[j, i] := 16;
end;
TMSFMXGrid1.EndUpdate;
Is there a way to make this persistent ?
Hi,
Is it possible to do this without creating a new class ? (will have to create a new package and so on...)
type
TTMSFMXGridEx= class(TTMSFMXGrid)
public
procedure DoGetCellLayout(ACol, ARow: Integer;
ALayout: TTMSFMXGridCellLayout; ACellState: TCellState); override;
end;
The OnGetCellLayout event is available at designtime for implementation. You can override the DoGetCellLayout as demonstrated in the sample below but it is currently not possible to save the font sizes and restore them without additional code. We will investigate how we can provide such functionality.
It will be nice to have this feature.
BTW, you're talking about the samble bellow, but I don't see anything ?
Sorry, I meant the sample above in your post :)