Difference between revisions of "TabulationTextStyle class"
Line 47: | Line 47: | ||
Tabulation_addParagraph(paragraph); | Tabulation_addParagraph(paragraph); | ||
+ | //new Tabulation().AddToBody(paragraph); | ||
</source> | </source> | ||
<source lang="javascript"> | <source lang="javascript"> | ||
//*** Set textStyle for ColumnHeaderLevel2 (other diagramStyle still keep using from styleSheet) ***// | //*** Set textStyle for ColumnHeaderLevel2 (other diagramStyle still keep using from styleSheet) ***// | ||
+ | //** Use SetTableDiagramStyle ***// | ||
TabulationDiagramParameter p = new TabulationDiagramParameter(); | TabulationDiagramParameter p = new TabulationDiagramParameter(); | ||
Line 74: | Line 76: | ||
<source lang="javascript"> | <source lang="javascript"> | ||
//*** Set textStyle for ColumnHeaderLevel2 (other diagramStyle if not set will using from default) ***// | //*** Set textStyle for ColumnHeaderLevel2 (other diagramStyle if not set will using from default) ***// | ||
+ | //** Use SetDiagramStyle ***// | ||
TabulationDiagramParameter p = new TabulationDiagramParameter(); | TabulationDiagramParameter p = new TabulationDiagramParameter(); |
Latest revision as of 05:42, 12 May 2022
TabulationTextStyle
Styles for use on a portion of text
Parent class
Inherits from object
Constructors
- () - Create a new TabulationTextStyle
- (bool isDefault "load default text style") - Create a default TabulationTextStyle
Methods
- TabulationTextStyle Clone() - Deep copy TabulationTextStyle object
- (From object) string ToString() - The string representation of the object.
Properties
- bool Bold { get; set; } - Get/Set Bold to string.
- Color Color { get; set; } - Get/Set Color of string.
- string FontFace { get; set; } - Get/Set FontFace of string.
- int FontSize { get; set; } - Get/Set FontSize of string in points. Must be 1-400 points
- bool IsInherit { get; set; } - Get/Set IsInherit.
- bool Italic { get; set; } - Get/Set Italic to string.
- string ObjectTypeName { get; } - The name of the type of object.
- (From object) TypeInformation TypeInformation { get; } - Get information about this class.
- bool Underline { get; set; } - Get/Set Underline to string.
Relevant classes and function : TabulationParagraphStyle, TabulationParagraph, Tabulation_addParagraph
Examples
//*** Set textStyle for paragraph ***//
TabulationParagraphStyle paragraphStyle = new TabulationParagraphStyle();
paragraphStyle.Alignment = "center"; //left, right, center.
//TabulationTextStyle
TabulationTextStyle textStyle = new TabulationTextStyle();
textStyle.Color = Color_getByName("red"); //Takes a color array-
//textStyle.Color = Color_getByRGB(255,0,0); // can also be set from rgb.
//textStyle.Color = new Color("red",false); // can also be set by Color object
textStyle.FontFace = "Bariol Regular";
textStyle.FontSize = 40; //1-399
textStyle.Bold = false;
textStyle.Italic = false;
textStyle.Underline = false;
TabulationParagraph paragraph = new TabulationParagraph(paragraphStyle);
paragraph.AddPortion("Some text", textStyle);
Tabulation_addParagraph(paragraph);
//new Tabulation().AddToBody(paragraph);
//*** Set textStyle for ColumnHeaderLevel2 (other diagramStyle still keep using from styleSheet) ***//
//** Use SetTableDiagramStyle ***//
TabulationDiagramParameter p = new TabulationDiagramParameter();
p.DataCacheId = 17116726;
TabulationTextStyle textStyle = new TabulationTextStyle();
//TabulationDiagramStyle diagramStyle = new TabulationDiagramStyle();
//TabulationTextStyle textStyle = diagramStyle.Text;
textStyle.Color = new Color ("red", false);
//print(Tabulation_getAvailableFonts());
textStyle.FontFace = "Comic Sans MS";
textStyle.FontSize = 8;
textStyle.Bold = true;
textStyle.Italic = true;
textStyle.Underline = true;
p.SetTableDiagramStyle(TableDiagram_ColumnHeaderLevel2, TABLE_DIAGRAM_STYLE_FONT, textStyle);
Tabulation t = new Tabulation ();
t.StyleSheet = new ReportStyleSheet(11060624);
t.CreateCrossDiagram({"Rit_3"}, {"VilStemme"}, p);
//*** Set textStyle for ColumnHeaderLevel2 (other diagramStyle if not set will using from default) ***//
//** Use SetDiagramStyle ***//
TabulationDiagramParameter p = new TabulationDiagramParameter();
p.DataCacheId = 17116726;
TabulationDiagramStyle diagramStyle = new TabulationDiagramStyle();
diagramStyle.Text.Color = new Color ("red", false);
//print(Tabulation_getAvailableFonts());
diagramStyle.Text.FontFace = "Comic Sans MS";
diagramStyle.Text.FontSize = 8;
diagramStyle.Text.Bold = true;
diagramStyle.Text.Italic = true;
diagramStyle.Text.Underline = true;
p.SetDiagramStyle(TableDiagram_ColumnHeaderLevel2, diagramStyle);
Tabulation t = new Tabulation ();
t.StyleSheet = new ReportStyleSheet(11060624);
t.CreateCrossDiagram({"Rit_3"}, {"VilStemme"}, p);