csharp System.Windows.Forms.Control.Text类(方法)实例源码

下面列出了csharp System.Windows.Forms.Control.Text 类(方法)源码代码实例,从而了解它的用法。

作者:.NET开发    项目:System.Windows.Form   
// Add a GroupBox to a form and set some of its common properties.
private void AddMyGroupBox()
{
   // Create a GroupBox and add a TextBox to it.
   GroupBox groupBox1 = new GroupBox();
   TextBox textBox1 = new TextBox();
   textBox1.Location = new Point(15, 15);
   groupBox1.Controls.Add(textBox1);

   // Set the Text and Dock properties of the GroupBox.
   groupBox1.Text = "MyGroupBox";
   groupBox1.Dock = DockStyle.Top;

   // Disable the GroupBox (which disables all its child controls)
   groupBox1.Enabled = false;

   // Add the Groupbox to the form.
   this.Controls.Add(groupBox1);
}


问题


面经


文章

微信
公众号

扫码关注公众号