关于上,小标可以用一段代码实现
type TCharacterFormat=(CFM_Superscript,...,...);
procedure RE_SetCharFormat(RichEdit: TRxRichEdit; CharacterFormat: TCharacterFormat);
var
Format: TCharFormat;
begin
FillChar(Format, SizeOf(Format), 0);
with Format do
begin
cbSize := SizeOf(Format);
dwMask := CFM_OFFSET;
case CharacterFormat of
CFM_Superscript: yOffset := 170;
CFM_Subscript: yOffset := -60;
CFM_Normal: yOffset := 0;
end;
end;
Richedit.Perform(EM_SETCHARFORMAT, SCF_SELECTION, Longint(@Format));
end;