Is there any way to set the part sub heading to bold

TeeChart for ActiveX, COM and ASP
Post Reply
Aravind
Newbie
Newbie
Posts: 75
Joined: Fri Nov 15, 2002 12:00 am

Is there any way to set the part sub heading to bold

Post by Aravind » Wed Oct 04, 2006 3:14 pm

i want to set a part of the sub heading to be bold.. i.e.

Year :2001,2002,2003 Facts: Volume

i want to set year and facts to be bold and 2001,2002,2003,volume on the normal style

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

Post by Pep » Fri Oct 06, 2006 4:34 pm

Hi Aravind,

I'm afraid there's not way to do this automatically. However a trick could be to use the Canvas.TextOut method, i.e. :

Code: Select all

Private Sub Form_Load()
TChart1.SubHeader.Text.Add "This is "
End Sub

Private Sub TChart1_OnAfterDraw()
TChart1.Canvas.Font.Bold = True
TChart1.Canvas.TextOut TChart1.SubHeader.Left + TChart1.Canvas.TextWidth(TChart1.SubHeader.Text.Item(0)), TChart1.SubHeader.Top + 1, "important"
End Sub

Post Reply