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
Name | Description |
---|---|
TDrawingRichString | Overloaded TDrawingRichString TDrawingRichString(String) TDrawingRichString(TDrawingTextParagraph[]) TDrawingRichString(String, TDrawingAlignment) |
Methods
Name | Description |
---|---|
Paragraph | A paragraph of the text. |
Substring | Overloaded Substring(Int32) Substring(Int32, Int32) |
Add | Adds two richstrings together. If using C#, you can just use the overloaded "+" operator to contactenate rich strings. |
Trim | Trims all the whitespace at the beginning and end of the string. |
RightTrim | Trims all the whitespace at the end of the string. |
ToString | Returns the string without Rich text info. |
HasFields | Returns true if the TDrawingRichString has any fields that must be replaced by values. |
ToRichString | Overloaded ToRichString(ExcelFile, TShapeFont) ToRichString(ExcelFile, TShapeFont, TFlxFont) ToRichString(ExcelFile, TShapeFont, TFlxFont, Func<String, TRichString>) ToRichString(ExcelFile, TShapeFont, TFlxFont, Func<String, TRichString>, Boolean) |
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) |
ReplaceText | Replaces the existing text in this struct with the text in rs, keeping the properties of the text. |
GetTextProperties | Modifies a TDrawingTextProperties by adding the settings from a TFxFont. |
CompareTo | Returns -1 if obj is bigger than this, 0 if both strings are the same, and 1 if obj is smaller than this. |
GetHashCode | Returns the hashcode of the object. |
Equals | Returns true if both instances have the same string and formatting. |
DrawingHAlignFromAlign | Converts a horizontal alignment from Excel alignment to Drawing alignment. |
ReplaceParagraph | Returns a new rich string with one paragraph of the original rich string replaced. |
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. |
Implicit Conversion | Overloaded Implicit conversion from String to TDrawingRichString Implicit conversion from TDrawingRichString to String |
Equality | Returns true if both strings are equal. |
Inequality | Returns true if both strings do not have the same value. |
LessThan | Returns true is a string is less than the other. |
GreaterThan | Returns true is a string is bigger than the other. |
Properties
Name | Description |
---|---|
Value | Text of the string without formatting. Might be null. |
ParagraphCount | The count of Paragraphs in this string. |
Length | Length of the DrawingRichString. |
IsEmpty | Returns true if the string has no data. |