We're using TeeChart in conjunction with user selectable filters.
My boss wants to print the filters as part of the heading or a subheading so that users can easily see what filters are being applied.
Seeing that there aren't any sub-headings, I'm trying to display the filters underneath the main heading through the use of a new line; however the SetCaption method doesn't seem to accept "\n" as a new line character.
Is there some setting I need to enable to accept "\n"? Or are there better alternatives that I'm not aware of?
Thanks!
New line in the header caption
Re: New line in the header caption
Hi n00b,
In what language are you programming?
Here in VB6, if I understand well what you want to do, you can do as follows:
In what language are you programming?
Here in VB6, if I understand well what you want to do, you can do as follows:
Code: Select all
TChart1.Header.Text.Text = "hello" + vbNewLine + "world"
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: New line in the header caption
Hi Yeray,
I'm coding this in C++. I would have thought that \n would have been the equivalent of VBs vbNewLine but it doesn't seem to work.
That will come out as
First LineSecond Line
instead of:
First Line
Second Line
I'm coding this in C++. I would have thought that \n would have been the equivalent of VBs vbNewLine but it doesn't seem to work.
Code: Select all
CString sHeader = "First Line" + "\nSecond Line";
m_wndChart.GetHeader().SetCaption(sHeader);
First LineSecond Line
instead of:
First Line
Second Line
Re: New line in the header caption
Hi n00b,
The following code works fine here in Microsoft Visual C++ 6:
The following code works fine here in Microsoft Visual C++ 6:
Code: Select all
m_Chart1.GetHeader().GetText().SetText("First Line\nSecond Line");
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: New line in the header caption
That worked perfectly!
Thanks Yeray!
Thanks Yeray!