How to En-Disabling checkboxes in the legend

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
fano
Newbie
Newbie
Posts: 56
Joined: Wed Jun 22, 2005 4:00 am
Location: USA, California

How to En-Disabling checkboxes in the legend

Post by fano » Mon Apr 03, 2006 8:40 pm

Hi,

I plot multiple series which can be turned on and off through the checkboxes in the associated legend. Works nicely.

How can I enable/disable particular checkboxes in the legend to prevent the user from un-checking or checking a particular series according to
some criteria?

Thanks,
fano

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Apr 04, 2006 8:45 am

Hi fano,

Just set the series you want ShowInLegend property to false as shown here:

Code: Select all

    private void Form1_Load(object sender, EventArgs e)
    {
      line1.FillSampleValues();
      line2.FillSampleValues();
      line3.FillSampleValues();

      line2.ShowInLegend = false;

      tChart1.Legend.CheckBoxes = true;
    }
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply