venus najad

venus najad

  • 1.3k
  • 414
  • 28.1k

make the controls in the fom works without button click

Feb 6 2019 12:54 PM
hello... i have two issues:
1. i have put a checkbox which will show a legend, when it is checked... i have used different codes, wthout any successes: the codes are as follows:
a. inside Form1_Load method
checkBox1.AutoCheck = true;
if (checkBox1.Checked)
{
legend1.Visible = true;
}
else
{
legend1.Visible = false;
}
 
b. i used seperate methods
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
legend1.Visible = checkBox1.Checked;
}
and
 
private void checkBox1_CheckStateChanged(object sender, EventArgs e)
{
if (checkBox1.Checked)
{
legend1.Visible = true;
}
else
{
legend1.Visible = false;
}
}
 
nothing happens and i dont get any error... the form hasnt any button and i dont want it...
 ***************************
2. i am trying to plot a graph in a scatter graph in the same form, which reads frequencies and calculate the function and plot it... how can i do it without any button... is it posiible?
 
appreciate any help... kind regards, venus 
 

Answers (1)