Table of Contents

TDrawingRichString Class

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

Namespace: FlexCel.Core

public sealed class TDrawingRichString: IComparable

Constructors

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.
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, ExcelFile, TDrawingAlignment)
FromRichString(TRichString, ExcelFile, TDrawingRichString, TDrawingAlignment)
FromRichString(TRichString, ExcelFile, 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.
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(Int32)
Substring(Int32, Int32)
ToRichString Overloaded
ToRichString(ExcelFile, TShapeFont)
ToRichString(ExcelFile, TShapeFont, TFlxFont)
ToRichString(ExcelFile, TShapeFont, TFlxFont, Func<String, TRichString>)
ToRichString(ExcelFile, TShapeFont, TFlxFont, Func<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 Concatenates two TDrawingRichString objects.
Equality Returns true if both strings are equal.
GreaterThan Returns true is a string is bigger than the other.
Implicit Conversion Overloaded
Implicit conversion from String to TDrawingRichString
Implicit conversion from TDrawingRichString to String
Inequality Returns true if both strings do not have the same value.
LessThan Returns true is a string is less than the other.

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.