ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Pattern fill a text box
Posted by Jagan on Sep-17-2013 19:37
Hi
Is it possible to fill text box with a pattern.
Thanks

  Re: Pattern fill a text box
Posted by Peter Kwan on Sep-18-2013 00:34
Hi Jagan,

Yes. It is possible to fill anything with a pattern. Just use a pattern color as the fill color. There is an example in the "Symbol Line Chart" sample code, in which the title (a TextBox) is filled with a pattern. (You may look up "Symbol Line Chart" from the ChartDirector documentation index.)

In brief, the code is like (in Java/C#):

//a method that returns a text box
ChartDirector.TextBox t = c.addText(.........);

//fill the text box with a patten loaded from a file
t.setBackground(c.patternColor2("c:\\\\aaa\\\\bbb\\\\mypattern.png"));

Hope this can help.

Regards
Peter Kwan

  Re: Pattern fill a text box
Posted by Jagan on Sep-18-2013 15:04
Thanks Peter, it worked great!