Page 1 of 1

Multi-Line Chart Title through code

Posted: Mon Nov 20, 2006 11:29 pm
by 9080944
Hello,

I am having a problem creating a multi-line chart title through code. The result is a title which appears on one line with the carrige return characters (square characters) appearing within the one line;

The title appears correctly in the Chart editor which I can open after I have assigned the title to the chart in code. It appears in the editor as follows;

1. Line 1
2. Line 2
3. Line 3

However on the chart, the title displays over one line.

How can I make the chart display the chart title on multiple lines?

Regards
Anthony

ps - Within code I have used both vbcrlf and chr(13) as the carrige return.

Posted: Mon Nov 27, 2006 1:31 pm
by Pep
Hi,

to display the title in multiple lines you will have to use similar code to the following :

Code: Select all

With TChart1.Header.Text
    .Clear
   .Add "1. Line 1"
   .Add "2. Line 2"
   .Add "3. Line 3"
End With