다음을 통해 공유


ListBox.UseTabStops 속성

ListBox에서 해당 문자열을 그릴 때 탭 문자를 인식하고 확장할 수 있는지 여부를 나타내는 값을 가져오거나 설정합니다.

네임스페이스: System.Windows.Forms
어셈블리: System.Windows.Forms(system.windows.forms.dll)

구문

‘선언
Public Property UseTabStops As Boolean
‘사용 방법
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)

속성 값

컨트롤에서 탭 문자를 확장할 수 있으면 true이고, 그렇지 않으면 false입니다. 기본값은 true입니다.

예제

다음 코드 예제에서는 탭 문자가 있는 항목을 표시하는 ListBox를 만드는 방법을 보여 줍니다.

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 보안

플랫폼

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

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

참고 항목

참조

ListBox 클래스
ListBox 멤버
System.Windows.Forms 네임스페이스