Julian
I am using a few styles. These are stored in Letter.css and are loaded when a new letter is created.
I use Futura fonts throughout. I have a Default style and a number of others.
I select a paragraph and then apply style1. I then click at the end of the paragraph and press Enter. The new paragraph does not have style1 but prints in Arial 11pt.
I have set the Default font to Futura 10pt and assumed that if I do not set a Next Style value that the Default style wold be used. Is this not the case?
Why is not the 'default' Next Style' the same as the actual style unless defined otherwise? Surely this is what a user would expect?
In case the issue is completely my fault ( ;-) ), my code to apply a style is as follows:
Code
procedure TfrmReport.dxBarComboStylesCloseUp(Sender: TObject);
begin
if not bMouseDown then
begin
RichText.TextCursor.CurrAttribute.BeginUpdate;
RichText.TextCursor.CurrAttribute.ClearAttr(true, true);
//RichText.CurrAttr.StyleName := dxBarComboStyles.CurText;
dxBarComboStyles.Text := dxBarComboStyles.CurText;
RichText.TextCursor.CurrAttribute.SetStyle(RichText.ParStyles.GetID(dxBarComboStyles.CurText));
RichText.TextCursor.CurrAttribute.EndUpdate;
RichText.ReformatAll(true); // Initialize because we changed the font
RichText.Repaint;
end;
end;
Alles anzeigen
Thanks.
Rob.