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

Message ListMessage List     Post MessagePost Message

  Determining title width / ASP Classic
Posted by Pat Lourigan on Sep-27-2012 03:19
I am currently using ChartDirector 4.1 for ASP/COM/VB and need to determine the actual width of a title created by calling addTitle2. The text in the title can vary in width. In reading the documentation, it appears that the title is created in a text box; however I'm unsure how to apply the getWith() function to return the actual width of the box.

  Re: Determining title width / ASP Classic
Posted by Peter Kwan on Oct-06-2012 02:10
Hi Pat,

Sorry for the late reply.

I think for addTitle2, the width of the text box is configured by ChartDirector to be equal to the width of the chart (assuming the title is put at the top or bottom of the chart). You can see the width of the text box by configuring a background color for the text box. If you look at the sample code that comes with ChartDirector, if the title has a background color, it always fills the entire width of the chart, so the width of the title text box should be the same as the width of the chart.

If you want to have a text box in which the size varies based on the text, you may use BaseChart.addText. Alternatively, you may try to apply setWidth(0) to the text box returned from addTitle2. According to the ChartDirector documentation, this would set the width of the text box to be based on the length of the text.

Hope this can help.

Regards
Peter Kwan