Freigeben über


ListBox.UseTabStops-Eigenschaft

Ruft einen Wert ab, der angibt, ob die ListBox beim Zeichnen von Zeichenfolgen Tabstoppzeichen erkennen und erweitern kann, oder legt diesen fest.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

Syntax

'Declaration
Public Property UseTabStops As Boolean
'Usage
Dim instance As ListBox
Dim value As Boolean

value = instance.UseTabStops

instance.UseTabStops = value
public bool UseTabStops { get; set; }
public:
property bool UseTabStops {
    bool get ();
    void set (bool value);
}
/** @property */
public boolean get_UseTabStops ()

/** @property */
public void set_UseTabStops (boolean value)
public function get UseTabStops () : boolean

public function set UseTabStops (value : boolean)

Eigenschaftenwert

true, wenn das Steuerelement Tabstoppzeichen erweitern kann, andernfalls false. Der Standardwert ist true.

Beispiel

Im folgenden Beispiel wird das Erstellen einer ListBox veranschaulicht, in der Elemente mit Tabstoppzeichen angezeigt werden.

Private Sub CreateTabStopList()
    Dim listBox1 As New ListBox()
    listBox1.SetBounds(20, 20, 100, 100)

    Dim x As Integer
    For x = 1 To 19
        listBox1.Items.Add(("Item" + ControlChars.Tab + x.ToString()))
    Next x
    ' Make the ListBox display tabs within each item.
    listBox1.UseTabStops = True
    Me.Controls.Add(listBox1)
End Sub
private void CreateTabStopList()
{
    ListBox listBox1 = new ListBox();
    listBox1.SetBounds(20,20,100,100);

    for(int x = 1; x < 20;x++)
    {
        listBox1.Items.Add("Item\t" + x.ToString());
    }
    // Make the ListBox display tabs within each item.
    listBox1.UseTabStops = true;
    this.Controls.Add(listBox1);
}
private:
   void CreateTabStopList()
   {
      ListBox^ listBox1 = gcnew ListBox;
      listBox1->SetBounds( 20, 20, 100, 100 );
      for ( int x = 1; x < 20; x++ )
      {
         listBox1->Items->Add( String::Concat( "Item\t", x ) );
      }
      listBox1->UseTabStops = true;
      this->Controls->Add( listBox1 );
   }
private void CreateTabStopList()
{
    ListBox listBox1 = new ListBox();
    listBox1.SetBounds(20, 20, 100, 100);

    for (int x = 1; x < 20; x++) {
        listBox1.get_Items().Add("Item\t" + Convert.ToString(x));
    }
    // Make the ListBox display tabs within each item.
    listBox1.set_UseTabStops(true);
    this.get_Controls().Add(listBox1);
} //CreateTabStopList

.NET Framework-Sicherheit

Plattformen

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

ListBox-Klasse
ListBox-Member
System.Windows.Forms-Namespace