UseTabStops Property

ListBox.UseTabStops Property

 

Gets or sets a value indicating whether the ListBox can recognize and expand tab characters when drawing its strings.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

Public Property UseTabStops As Boolean

Property Value

Type: System.Boolean

true if the control can expand tab characters; otherwise, false. The default is true.

The following code example demonstrates how to create a ListBox that displays items with tab characters.

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

SecurityPermission

for operating with unmanaged code. Associated enumeration: UnmanagedCode

.NET Framework
Available since 1.1
Return to top
Show:
© 2016 Microsoft