How to change Chart title in runtime with C++/MFC ?

TeeChart for ActiveX, COM and ASP
Post Reply
Michael
Newbie
Newbie
Posts: 1
Joined: Thu Aug 19, 2004 4:00 am
Location: China
Contact:

How to change Chart title in runtime with C++/MFC ?

Post by Michael » Fri Aug 20, 2004 8:41 am

I want to change the title in runtime.
But I can not find corresponding method in class CTChart.
Could you tell me how to do it, or it is impossible in MFC?

Christopher
Site Admin
Site Admin
Posts: 1349
Joined: Thu Jan 01, 1970 12:00 am
Location: Riudellots de la Selva, Catalonia
Contact:

Post by Christopher » Fri Aug 20, 2004 12:40 pm

Hi Michael,
I want to change the title in runtime.
But I can not find corresponding method in class CTChart.
Could you tell me how to do it, or it is impossible in MFC?
Try:

Code: Select all

#include "Titles.h"
#include "Strings.h"

m_Chart1.GetHeader().GetText().Clear();
m_Chart1.GetHeader().GetText().Add(COleVariant("A New Title"));
Thank you!

Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/

Post Reply