Can te widht of the legend box be found?

TeeChart for ActiveX, COM and ASP
Post Reply
Ragnar
Newbie
Newbie
Posts: 9
Joined: Fri Nov 15, 2002 12:00 am
Location: Iceland

Can te widht of the legend box be found?

Post by Ragnar » Fri Apr 16, 2004 10:38 am

Hello.

I need to right align the legend box in the charts right upper corner. To do so I need to know the legend width to be able to calculate the desired Legend.Left. Can the with be found in code?

Best Regards,
Ragnar

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

Post by Pep » Sun Apr 18, 2004 5:23 pm

Hi Ragnar,

yes, you can use the OnGetLegendRect event :

Code: Select all

Private Sub TChart1_OnGetLegendRect(Left As Long, Top As Long, Right As Long, Bottom As Long)
 Height = Bottom - Top 
 Width = Right - Left
End Sub

Post Reply