Hi Jim,
Thank you for your response.
Yes, you could put the controls on several panels on the form and
enable/disable the panels. It is an option.
You can also use databinding to enable/disable the controls on the form. I
mean that you could bind the ReadOnly or Enabled property of the controls
to a custom business object's field and then you could change the value of
this field in the custom business object to enable/disable the
corresponding controls.
The following is a sample.
public partial class Form1 : Form
{
private BusinessClass businessObj;
public Form1()
{
InitializeComponent();
businessObj = new BusinessClass();
this.textBox1.DataBindings.Add("ReadOnly", businessObj,
"ReadOnly");
this.textBox2.DataBindings.Add("ReadOnly", businessObj,
"ReadOnly");
businessObj.ReadOnly = true;
}
}
public class BusinessClass
{
private bool _ReadOnly = true;
public bool ReadOnly
{
get { return _ReadOnly; }
set { _ReadOnly = value; }
}
}
Hope this is helpful to you.
If you have any other concerns or need anything else, please don't hesitate
to let me know.
Sincerely,
Linda Liu
Microsoft Online Community Support
====================================================
When responding to posts,please "Reply to Group" via
your newsreader so that others may learn and benefit
from your issue.
====================================================