here is the code I have:
Code: Select all
using Neo.ApplicationFramework.Controls.Script;
public partial class FSystemInfo
{
void Button1_Click(System.Object sender, System.EventArgs e)
{
AnalogNumericCFAdapter myTxt = GetTextBox("an_ABC");
myTxt.Value = 2;
}
public AnalogNumericCFAdapter GetTextBox(string txtName){
Type FormType = this.GetType();
FieldInfo field = FormType.GetField(txtName,BindingFlags.NonPublic | BindingFlags.Instance);
if( field != null ){
Neo.ApplicationFramework.Controls.Controls.Label lb;
lb = (Neo.ApplicationFramework.Controls.Controls.Label) field.GetValue(this);
AnalogNumericCFAdapter myTxt;
myTxt = this.AdapterService.CreateAdapter<Neo.ApplicationFramework.Controls.Script.AnalogNumericCFAdapter>(lb);
return myTxt;
}
return null;
}
}