Page 1 of 1

How to insert/inject a Text programmatically ?

Posted: Mon Oct 05, 2020 9:42 pm
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 ?

Re: How to insert/inject a Text programmatically ?

Posted: Mon Oct 05, 2020 11:33 pm
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);

Re: How to insert/inject a Text programmatically ?

Posted: Tue Oct 06, 2020 9:07 am
by Lech Kulikowski
Hello,

Thank you for the information.