Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

TabulationParagraph class: Difference between revisions

From Catglobe Wiki
Created page with "{{CGscriptClass_Template |Name=TabulationParagraph |Description=A paragraph possible to add to reports. Contains portions and paragraph specific styling |Constructors= {{CGscr..."
 
No edit summary
Line 21: Line 21:
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}}
{{CGscriptProperties_Template|ReturnType=TypeInformation|Name=TypeInformation|HasGetter=1|Description=Get information about this class.}}
}}
}}
=== <span style="color:#DF8621">'''Examples'''</span> ===
<source lang="javascript">
//Create the paragraph
TabulationParagraph paragraph = new TabulationParagraph(paragraphStyle); //It needs the paragraphStyle defined above.
//The paragraph contains portions of text
//Each portion can be styled individually with a TabulationTextStyle
paragraph.AddPortion("Some text", textStyle);
//A paragraph can also be instatiated with portion and portion style in constructor
TabulationParagraph paragraph2 = new TabulationParagraph(paragraphStyle, "Some text ", textStyle);
//It is also possible to add hyperlinks
paragraph2.AddLink("CatGlobe", "http://catglobe.com", textStyle);
//Add the paragraphs to the report
Tabulation_addParagraph(paragraph);
Tabulation_addParagraph(paragraph2);
</source>

Revision as of 14:17, 21 June 2016

TabulationParagraph



A paragraph possible to add to reports. Contains portions and paragraph specific styling

Constructors

Methods

  • Empty AddLink(string text "Text to be added to the paragraph", string link "Link on the text", TabulationTextStyle textStyle "The style to applied to the portion") - Add a new portion with link to the Paragraph
  • Empty AddPortion(string text "Text to be added to the paragraph", TabulationTextStyle textStyle "The style to applied to the portion") - Add a new portion to the Paragraph
  • string ToString() - The string representation of the object.

Properties

  • string ObjectTypeName { get; } - The name of the type of object.
  • TypeInformation TypeInformation { get; } - Get information about this class.


Examples

//Create the paragraph
TabulationParagraph paragraph = new TabulationParagraph(paragraphStyle); //It needs the paragraphStyle defined above.
//The paragraph contains portions of text
 //Each portion can be styled individually with a TabulationTextStyle
paragraph.AddPortion("Some text", textStyle);

//A paragraph can also be instatiated with portion and portion style in constructor
TabulationParagraph paragraph2 = new TabulationParagraph(paragraphStyle, "Some text ", textStyle);

//It is also possible to add hyperlinks
paragraph2.AddLink("CatGlobe", "http://catglobe.com", textStyle);

//Add the paragraphs to the report
Tabulation_addParagraph(paragraph);
Tabulation_addParagraph(paragraph2);