Multi-Line Chart Title through code

TeeChart for ActiveX, COM and ASP
Post Reply
paligap
Newbie
Newbie
Posts: 19
Joined: Tue Feb 24, 2004 5:00 am
Location: Australia

Multi-Line Chart Title through code

Post by paligap » Mon Nov 20, 2006 11:29 pm

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.

Pep
Site Admin
Site Admin
Posts: 3305
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Nov 27, 2006 1:31 pm

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

Post Reply