ListBox.UseTabStops プロパティ

定義

ListBox で文字列を描画するときにタブ文字を認識して展開するかどうかを示す値を取得または設定します。

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

プロパティ値

Boolean

コントロールでタブ文字を展開できる場合は true。それ以外の場合は false。 既定値は、true です。

次のコード例は、タブ文字を含む項目を表示するオブジェクトを ListBox 作成する方法を示しています。

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.Items.Add("Item\t" + x.ToString());
    }
    // Make the ListBox display tabs within each item.
    listBox1.UseTabStops = true;
    this.Controls.Add(listBox1);
}
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

適用対象