) UpdateBounds 已重载。 更新控件的边界。 (从 Control 继承。) UpdateStyles 强制将分配的样式重新应用到控件。 (从 Control 继承。) UpdateZOrder 按控件的父级的 Z 顺序更新控件。 (从 Control 继承。) WndProc 已重写。 页首 请参见 参考 TextBox 类 System.Windows.Forms 命名空间 TextBoxBase...
public class TextBox : System.Windows.Forms.TextBoxBase继承 Object MarshalByRefObject Component Control TextBoxBase TextBox 派生 System.Windows.Forms.DataGridTextBox System.Windows.Forms.DataGridViewTextBoxEditingControl 示例下面的代码示例创建一个具有垂直滚动条的多行 TextBox 控件。 此示例使用 AcceptsTab、...
TextBox textBox = new TextBox(); textBox.Width = 500; textBox.Header = "Notes"; textBox.PlaceholderText = "Type your notes here"; // Add the TextBox to the visual tree. rootGrid.Children.Add(textBox); 產生的 TextBox 看起來像這樣。 藍色框線表示 TextBox 有焦點。Text...
System.Windows.Forms.dll Source: TextBoxBase.cs Gets or sets a value indicating whether the selected text in the text box control remains highlighted when the control loses focus. C# publicboolHideSelection {get;set; } Property Value Boolean ...
System.Windows.Forms.MaskedTextBox System.Windows.Forms.RichTextBox System.Windows.Forms.TextBox 属性 DefaultBindingPropertyAttribute 示例下面的代码示例使用 TextBox派生类创建具有垂直滚动条的多行 TextBox 控件。 此示例还使用 AcceptsTab、 AcceptsReturn和WordWrap 属性使多行文本框控件可用于创建文本文档。C#...
命名空间: System.Windows.Forms 程序集: System.Windows.Forms.dll Source: Control.cs 在控件失去焦点时发生。 C# 复制 [System.ComponentModel.Browsable(false)] public event EventHandler? LostFocus; 事件类型 EventHandler 属性 BrowsableAttribute 示例 下面的代码示例演示如何验证 TextBox1 的文本。 它...
System.Windows.Forms.DataGridViewTextBoxEditingControl 例次のコード例では、垂直スクロール バーを含む複数行 TextBox コントロールを作成します。 次の使用例は、 AcceptsTab、 AcceptsReturn、および Dock の各プロパティを使用して、テキスト ドキュメントの作成に役立つ複数行テキスト ボックス...
private void toolStripTextBox1_Click(object sender, EventArgs e) { toolStripTextBox1.SelectAll(); } // Navigates to the URL in the address box when // the ENTER key is pressed while the ToolStripTextBox has focus. private void toolStripTextBox1_KeyDown(object sender, KeyEventArgs e) {...
Enables the user to select a single option from a group of choices when paired with other RadioButton controls.C# Copy [System.ComponentModel.DefaultBindingProperty("Checked")] public class RadioButton : System.Windows.Forms.ButtonBaseInheritance Object MarshalByRefObject Component Control ButtonBase ...
Windows.Forms.ComboBox control with ImeMode set to ImeMode.NoControl on CHS with Pinyin keyboard to retain input mode of the parent container control instead of switching to disabled IME when navigating using mouse clicks and when focus moves from a control with disabled IME to this ComboBox ...