TXLSXRichText uchovává naformátované textové běhy pro TXLSXCell.RichText a rich text komentářů v XLSX fasádě
Deklarace
type
TXLSXRichText = class
function AddRun: TXLSXRichTextRun;
function AddRunText(const AText: WideString): TXLSXRichTextRun;
procedure Clear;
function PlainText: WideString;
property RunCount: Integer;
property Runs[Index: Integer]: TXLSXRichTextRun;
end;
TXLSXRichTextRun = class
property Text, Name: WideString;
property Size: Double;
property Bold, Italic, Strikethrough, ColorIsAuto: Boolean;
property Underline: TXLSXUnderline;
property Color: LongWord;
property VertAlign: TXLSXFontVertAlign;
end;Klíčové členy
| AddRun and AddRunText | Připojí prázdný běh, nebo běh s počátečním textem |
| PlainText | Vrátí zřetězený text bez informací o stylu |
| Name, Size, Bold, Italic and Strikethrough | Rodina a velikost písma a základní stylové atributy jednoho běhu |
| Underline, Color and ColorIsAuto | Volby podtržení a barvy běhu |
| VertAlign | Svislé zarovnání baseline, subscript nebo superscript |
Příklad
var Rich: TXLSXRichText;
begin
Rich := TXLSXRichText.Create;
Rich.AddRunText('Quarterly ');
Rich.AddRunText('Report').Bold := True;
Sheet.Cells[1, 1].RichText := Rich;
end;Viz také