Hi all,
I'm trying so apply selected and active cells appearance in a way that selected cells have backcolor and forecolor. The active cell should have no color, only a thick black border. Some cells have some meaningfull backcolor and I like to see theses backcolor for the active cell (not for selected cells). I have tried to achieve this with the following code at Initialize_Layout event:
// Default-Appearance für selected Cells e.Layout.Override.SelectedAppearancesEnabled = DefaultableBoolean.True; e.Layout.DefaultSelectedBackColor = ClientParam.Instance.ParamColors.GetColor(Color.LightGrey ); e.Layout.DefaultSelectedForeColor = ClientParam.Instance.ParamColors.GetColor( Color.Black ); e.Layout.Override.SelectedCellAppearance.BorderColor = Color.White; e.Layout.Override.SelectedCellAppearance.BorderColor2 = Color.White; // Default-Appearance for active cells e.Layout.Override.ActiveAppearancesEnabled = DefaultableBoolean.True; e.Layout.Override.ActiveCellAppearance.BackColor = ClientParam.Instance.ParamColors.GetColor( Color.Transparent ); e.Layout.Override.ActiveCellAppearance.ForeColor = ClientParam.Instance.ParamColors.GetColor( Color.Empty ); e.Layout.Override.ActiveCellAppearance.FontData.Bold = DefaultableBoolean.True; e.Layout.Override.ActiveCellAppearance.BorderColor = Color.Black; e.Layout.Override.ActiveCellBorderThickness = 3
The active cell looks LightGrey with forecolor = black and I can not see the cells backcolor and forecolor.
Does anybody has some directions for me?
Thank you and best regards
Markus
Markus,
Have you tried setting ActiveAppearancesEnabled to "DefaultableBoolean.False"? It is true that this will prevent you from being able to set the font of the text of the ActiveCell to "Bold" in the InitializeLayout event, but you could set it in the BeforeCellActivate event and then set it back to normal in the BeforeCellDeactivate event. Could you try that and let me know if this enables you to achieve what you want?
Hello Michael,
I have tried your approach but it does not solve the problem that the active cell should have NO backcolor. Selected cells can have backcolor. My cells can have different backcolors and fore colors and users should see these colors of the active cell (see attached picture). For selected cells I can accept a special selected colors.
I have tried set the Backcolor of the active cell to Color.Transparent, but the cell still has a background color. Maybe I have some influence from style set I'm using for my application but I have to remove settings from the for the active cell. I have also attached my style set file.
I have also tried setting the SelectionOverlay-properties but this does not allow select multiple block of cells and it is not possible to select cells in over band borders.
Do you have another idea to solve my requirements?
Best regards