我有一个简单的winform应用程序我在designer.cs页面中有一个GroupBox
我也可以在设计中看到。现在我尝试从后面的代码访问m_ConstraintGroupBox
我无法访问ComboBox
Label
以及我可以访问的其他控件的位置。在我的设计器代码中。
System.Windows.Forms.GroupBox m_ConstraintGroupBox;
m_ConstraintGroupBox= new System.Windows.Forms.GroupBox();
m_ConstraintGroupBox.SuspendLayout();
m_ConstraintGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
m_ConstraintGroupBox.Controls.Add(this.cmbConstriant);
m_ConstraintGroupBox.Controls.Add(this.lblConstraint);
m_ConstraintGroupBox.Controls.Add(this.groupBox1);
m_ConstraintGroupBox.Location = new System.Drawing.Point(378, 194);
m_ConstraintGroupBox.Name = "m_ConstraintGroupBox";
m_ConstraintGroupBox.Size = new System.Drawing.Size(216, 79);
m_ConstraintGroupBox.TabIndex = 3;
m_ConstraintGroupBox.TabStop = false;
m_ConstraintGroupBox.Text = "Constraint";
访问代码在
之下public sealed partial class LinkForm : AMBaseForm
{
private Link m_link;
private readonly BindingList<Interface> m_interfaces = new BindingList<Interface>();
private DomainFilterROCollection<ComponentClass> m_availComponentClasses;
private DomainFilterROCollection<Gauge> m_gaugies;
public LinkForm()
{
InitializeComponent();
cmbConstriant.Visible = false;
lblConstraint.Visible = false;
m_ConstraintGroupBox.
m_ChooseIconControlControl.IsNode = false;
}
}