How to insert/inject a Text programmatically ?

Stimulsoft Reports.JS discussion
Post Reply
hugo
Posts: 359
Joined: Fri Mar 08, 2013 10:46 am

How to insert/inject a Text programmatically ?

Post by hugo »

How to insert/inject a Text programmatically ?

This is how I do with Stimulsoft Flex (on this case a StiText vertical on the left side of the page:
var myText:StiText = new StiText(new StiRectangle(-0.5, page.height - 15, 0.4, 15), "My sample text");
myText.font = new StiFont("Arial", 8, "Point", 2);
myText.textOptions.angle = 90;
page.components.add(myText);

How to do achieve the same with Stimulsoft JS ?
hugo
Posts: 359
Joined: Fri Mar 08, 2013 10:46 am

Re: How to insert/inject a Text programmatically ?

Post by hugo »

Solved:

var myText = new Stimulsoft.Report.Components.StiText(new Stimulsoft.System.Drawing.Rectangle(-0.5, page.height, 0.5, 15));
myText.text = "My sample text";
myText.font = new Font("Arial", 8, "Point", 2);
myText.textOptions = new Stimulsoft.Base.Drawing.StiTextOptions();
myText.textOptions.angle = 90;
page.components.add(myText);
Lech Kulikowski
Posts: 6261
Joined: Tue Mar 20, 2018 5:34 am

Re: How to insert/inject a Text programmatically ?

Post by Lech Kulikowski »

Hello,

Thank you for the information.
Post Reply