TXLSXRichText almacena segmentos de texto con estilo para TXLSXCell.RichText y texto enriquecido de comentarios en la fachada XLSX
Declaraciones
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;
Miembros principales
| AddRun and AddRunText | Añade un segmento vacío o un segmento con texto inicial |
| PlainText | Devuelve el texto concatenado sin información de estilo |
| Name, Size, Bold, Italic and Strikethrough | Familia de fuente, tamaño y atributos de estilo básicos de un segmento |
| Underline, Color and ColorIsAuto | Opciones de subrayado y color del segmento |
| VertAlign | Alineación vertical de línea base, subíndice o superíndice |
Ejemplo
var Rich: TXLSXRichText;
begin
Rich := TXLSXRichText.Create;
Rich.AddRunText('Quarterly ');
Rich.AddRunText('Report').Bold := True;
Sheet.Cells[1, 1].RichText := Rich;
end;Véase también