Hello,
1.
I have a question regarding the situation, when some style is applied to the cell in a table and the style has background color property.
When I apply the style to some cell, the background color from the style is not saved in RTF file for this cell, and after I open this RTF file again, the color is not displayed.
Example: I add new style with background color
with AEditor.ParStyles.AddStyle('new') dobegin ASet(WPAT_ShadingValue, 100); ASet(WPAT_ShadingType, WPSHAD_solidbg); ASetColor(WPAT_BGColor, clRed);end;
I apply the style to some active cell
AEditor.TableCell.SetStyle(Editor.ParStyles.FindStyle('new'), True, True);//orAEditor.ActiveStyleName := 'new';
Actually when I apply this new style to the cell - WPEditor shows it with new color but then does not save in RTF. If I apply background color directly to the cell by setting paragraph
AEditor.TableCell.ASetColor(WPAT_BGColor, clRed); ... and other properties - it goes fine.
Also this style works fine for simple text paragraphs. But not for cells in table.
What I do wrong? Should I setup something additional?
2.
My second question relates the similar situation. I found that borders information from styles is not saved into RTF.
When I create style with border information it is applied to the Editor and is visible but not after save to RTF (neither for simple paragraphs nor for cells in a table).
with SomeTextStyle do
begin
ASetColor(WPAT_BorderColorR, clBlack);
ASet(WPAT_BorderFlags, WPBRD_DRAW_Right);
ASet(WPAT_BorderWidth, WPCentimeterToTwips(0.05));
end;
Is there any way to keep this info in RTF and correctly display borders from a style?
Best regards,
Oleksandr