TextBoxBase.AcceptsTab Özellik

Tanım

Çok satırlı metin kutusu denetiminde SEKME tuşuna basıldığında odağı sekme sırası içindeki bir sonraki denetime taşımak yerine denetime bir SEKME karakteri yazıp yazmadığını belirten bir değer alır veya ayarlar.

public:
 property bool AcceptsTab { bool get(); void set(bool value); };
public bool AcceptsTab { get; set; }
member this.AcceptsTab : bool with get, set
Public Property AcceptsTab As Boolean

Özellik Değeri

Boolean

true kullanıcılar SEKME tuşunu kullanarak çok satırlı bir metin kutusuna sekme girebiliyorsa; false SEKME tuşuna basıldığında odak taşınır. Varsayılan değer: false.

Örnekler

Aşağıdaki kod örneği, dikey kaydırma çubuklarıyla çok satırlı TextBox bir denetim oluşturmak için türetilmiş bir sınıfı kullanırTextBox. Bu örnekte, çok satırlı metin kutusu denetiminin metin belgeleri oluştururken kullanışlı olmasını sağlamak için , AcceptsReturnve WordWrap özellikleri de kullanılırAcceptsTab.

public:
   void CreateMyMultilineTextBox()
   {
      // Create an instance of a TextBox control.
      TextBox^ textBox1 = gcnew TextBox;
      
      // Set the Multiline property to true.
      textBox1->Multiline = true;
      // Add vertical scroll bars to the TextBox control.
      textBox1->ScrollBars = ScrollBars::Vertical;
      // Allow the RETURN key in the TextBox control.
      textBox1->AcceptsReturn = true;
      // Allow the TAB key to be entered in the TextBox control.
      textBox1->AcceptsTab = true;
      // Set WordWrap to true to allow text to wrap to the next line.
      textBox1->WordWrap = true;
      // Set the default text of the control.
      textBox1->Text = "Welcome!" + Environment::NewLine + "Second Line";
   }
public void CreateMyMultilineTextBox()
 {
    // Create an instance of a TextBox control.
    TextBox textBox1 = new TextBox();
    
    // Set the Multiline property to true.
    textBox1.Multiline = true;
    // Add vertical scroll bars to the TextBox control.
    textBox1.ScrollBars = ScrollBars.Vertical;
    // Allow the RETURN key in the TextBox control.
    textBox1.AcceptsReturn = true;
    // Allow the TAB key to be entered in the TextBox control.
    textBox1.AcceptsTab = true;
    // Set WordWrap to true to allow text to wrap to the next line.
    textBox1.WordWrap = true;
    // Set the default text of the control.
    textBox1.Text = "Welcome!" + Environment.NewLine + "Second Line";
 }
Public Sub CreateMyMultilineTextBox()
    ' Create an instance of a TextBox control.
    Dim textBox1 As New TextBox()
    
    ' Set the Multiline property to true.
    textBox1.Multiline = True
    ' Add vertical scroll bars to the TextBox control.
    textBox1.ScrollBars = ScrollBars.Vertical
    ' Allow the RETURN key in the TextBox control.
    textBox1.AcceptsReturn = True
    ' Allow the TAB key to be entered in the TextBox control.
    textBox1.AcceptsTab = True
    ' Set WordWrap to true to allow text to wrap to the next line.
    textBox1.WordWrap = True
    ' Set the default text of the control.
    textBox1.Text = "Welcome!" & Environment.NewLine & "Second Line"
End Sub

Açıklamalar

Özelliği, Multiline denetimde bir SEKME karakteri almak için de olmalıdır true .

AcceptsTab özelliği olarak trueayarlanırsa, kullanıcının odağı sekme sırasına göre bir sonraki denetime taşımak için CTRL+SEKME tuşlarına basması gerekir.

Şunlara uygulanır

Ayrıca bkz.