Table of Contents

TDrawingRichString Record

A rich string used in drawings. It is similar to TRichString but it has more properties like for example wordart properties. Similar to a string, this class is immutable.

Syntax

Unit: FlexCel.Core

TDrawingRichString = record;

Methods

Name Description
Add Adds two richstrings together. If using C#, you can just use the overloaded "+" operator to contactenate rich strings.
CompareTo Returns -1 if obj is bigger than this, 0 if both strings are the same, and 1 if obj is smaller than this.
Create Overloaded
Create
Create(string)
Create(TDrawingTextParagraphArray)
Create(string, TDrawingAlignment)
DrawingHAlign​From​Align Converts a horizontal alignment from Excel alignment to Drawing alignment.
Equals Returns true if both instances have the same string and formatting.
FirstRun Returns the first run of the text. Note that an empty TDrawingRichText can have a run anyway, while a TRichString can't.
If there is no first run, the returned value will have a a negative FirstChar.
FromRichString Overloaded
FromRichString(TRichString, TCoreExcelFile, TDrawingAlignment)
FromRichString(TRichString, TCoreExcelFile, TDrawingRichString, TDrawingAlignment)
FromRichString(TRichString, TCoreExcelFile, TDrawingRichString, TDrawingAlignment, Boolean)
GetHashCode Returns the hashcode of the object.
GetTextProperties Modifies a TDrawingText​Properties by adding the settings from a TFxFont.
HasFields Returns true if the TDrawingRichString has any fields that must be replaced by values.
HasValue Returns true if the record has a defined value. This is the inverse of IsNull
IsNull Returns true if the record doesn't have a defined value.
Paragraph A paragraph of the text.
ReplaceParagraph Returns a new rich string with one paragraph of the original rich string replaced.
ReplaceText Replaces the existing text in this struct with the text in rs, keeping the properties of the text.
RightTrim Trims all the whitespace at the end of the string.
Substring Overloaded
Substring(Integer)
Substring(Integer, Integer)
ToRichString Overloaded
ToRichString(TCoreExcelFile, IShapeFont)
ToRichString(TCoreExcelFile, IShapeFont, TFlxFont)
ToRichString(TCoreExcelFile, IShapeFont, TFlxFont, TFunc<string, TRichString>)
ToRichString(TCoreExcelFile, IShapeFont, TFlxFont, TFunc<string, TRichString>, Boolean)
ToString Returns the string without Rich text info.
Trim Trims all the whitespace at the beginning and end of the string.
WithNewFieldIds Returns a new TDrawingRichString with new field ids if the DrawingRichString has field ids.
While FlexCel will do this automatically when you link a shape, you can use this method when creating a new linked shape that requires new field ids.

Operators

Name Description
Addition Adapts the + operator so it can add two instances of this record.
Equality Adapts the = operator so it returns true when both instances have the same values.
GreaterThan Adapts the > operator so it returns true when the first parameter is bigger than the second.
Implicit Conversion Overloaded
Implicit conversion from string to TDrawingRichString
Implicit conversion from TDrawingRichString to string
Inequality Adapts the <> operator so it returns true when both instances have different values.
LessThan Adapts the < operator so it returns true when the first parameter is smaller than the second.

Properties

Name Description
IsEmpty Returns true if the string has no data.
Length Length of the DrawingRichString.
ParagraphCount The count of Paragraphs in this string.
Value Text of the string without formatting. Might be null.