J
Jim Heavey
Hello, I have created a form which I intend to use a a dialog box. It has
a few controls on that form and I changed the properties of those controls
to "public" with the idea that I could access those controls from the
"calling form", but I am unable to access/see those controls. Why?
Here are portions of my code
Here I am substantiating the new form and trying to set values for the
controls on that form...
Form frm = new frmGenericInputDialog();
frm.txtSkaterName.Text = item.SubItems[0].Text;
frm.txtCurrentPlacement.Text = cboFinalsFinish.SelectedIndex+1;
DialogResult rslt = frm.ShowDialog();
Here are the declarations of those controls in the
public System.Windows.Forms.TextBox txtSkaterName;
public System.Windows.Forms.Label lblNewPlacement;
public System.Windows.Forms.ComboBox cboCurrentPlacement;
public System.Windows.Forms.TextBox txtCurrentPlacement;
So why can't I access these controls?
a few controls on that form and I changed the properties of those controls
to "public" with the idea that I could access those controls from the
"calling form", but I am unable to access/see those controls. Why?
Here are portions of my code
Here I am substantiating the new form and trying to set values for the
controls on that form...
Form frm = new frmGenericInputDialog();
frm.txtSkaterName.Text = item.SubItems[0].Text;
frm.txtCurrentPlacement.Text = cboFinalsFinish.SelectedIndex+1;
DialogResult rslt = frm.ShowDialog();
Here are the declarations of those controls in the
public System.Windows.Forms.TextBox txtSkaterName;
public System.Windows.Forms.Label lblNewPlacement;
public System.Windows.Forms.ComboBox cboCurrentPlacement;
public System.Windows.Forms.TextBox txtCurrentPlacement;
So why can't I access these controls?