Objective Grid: Rich edit cells do not change font with format style changes

Article ID: 181
Last updated: 04 Jun, 2018
Article ID: 181
Last updated: 04 Jun, 2018
Revision: 3
Views: 2479
Posted: 23 Jan, 2001
by Meltreger B.
Updated: 04 Jun, 2018
by Meltreger B.

Problem


If I change the font in the standard style with Format Styles, the edit cells change but the rich edit cells do not. Can you explain this?


Cause



Action


The rich edit control does not support inheriting attributes (font, text alignment) which need to be stored directly into RTFstring. You have to call SetStyleRange() explicitly for each RichEditCell.

Example:

SetStyleRange(CGXRange(1,1,GetRowCount(), GetColCount()), CGXStyle().SetFont(....).SetHorizontalAlignment(...));

All other attributes like background color can be applied by changing the standard-style.

If you only have a few rich edit cells you might also loop through the cells and call SetStyleRange() only for rich edit cells and change all other cells via StandardStyle().

This article was:   Helpful | Not helpful
Report an issue
Article ID: 181
Last updated: 04 Jun, 2018
Revision: 3
Views: 2479
Posted: 23 Jan, 2001 by Meltreger B.
Updated: 04 Jun, 2018 by Meltreger B.
Comments


Others in this category