I've been using the GetCellLayout event to set border colors but for a global setting I'd assumed that Appearance.NormalLayout.Stroke would be the one to use - but it doesn't seem to have any effect. I've had a look in the source and can see it being assigned but is there a linked setting I'm missing?
For which cell state specifically? normal cells are unfocused nonfixed cells
Yeah - the unfocused nonfixed cells. So if I just drop a grid on a form and set Appearance.NormalLayout.Stroke to a different color I'd expect to see the border color of all cells to change. It doesn't appear to have any effect at all. The only way I've found to change the border color in the Grid properties is via the columns BorderColor property.
Strange - the color of Appearance.NormalLayout.Stroke is applied to the border of the cell edit control when editing the cell. Being slightly color blind I didn't notice this until I increased the stroke thickness :-)
Appearance.SelectedLayout.Stroke works as expected - a selected cell range has the border color of all cells set to the correct color. However, font colors stay unchanged, while the fill color gets changed as expected and the visible sides change as expected.
There seems to be quite a bit of inconsistency in which properties have a visible effect.
There are settings related to column border colors at column collection level. These are applied on top of the default settings under appearance, if you don't want to use the column settings, you need to set UseColumns to False, this way, you can set the colors with the appearance properties.
TMSFNCGrid1.UseColumns := False;
TMSFNCGrid1.Appearance.NormalLayout.Stroke.Color := gcRed;
TMSFNCGrid1.Appearance.NormalLayout.Stroke.Kind := gskSolid;
This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.