Autosize using .NET Chart Control - Code Help!

private: System::Void checkBox1_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {

if(checkBox1->CheckState == CheckState::Checked)
this->chart2->AutoSize = true;
this->chart1->AutoSize = true;
this->chart3->AutoSize = true;

else if(checkBox1->CheckState == CheckState::Unchecked)
this->chart1->AutoSize = false;
this->chart2->AutoSize = false;
this->chart3->AutoSize = false;

Above is what I have written to try and autosize 3 graphs. When the check box is marked it will autosize the graph and when it isn't, it won't autosize. This code does not work, and I was wondering if anyone could help me with it? I am using Visual Studio Windowns Application Form.
Topic archived. No new replies allowed.