StatusBar.Text 속성

정의

StatusBar 컨트롤과 관련된 텍스트를 가져오거나 설정합니다.

public:
 virtual property System::String ^ Text { System::String ^ get(); void set(System::String ^ value); };
public override string Text { get; set; }
member this.Text : string with get, set
Public Overrides Property Text As String

속성 값

String

StatusBar 컨트롤과 관련된 텍스트입니다.

예제

다음 코드 예제를 사용 하는 방법에 설명 합니다 Text 속성입니다. 예제를 실행 하는 폼에 다음 코드를 붙여넣습니다. 호출 된 InitializeSimpleStatusBar 폼의 생성자 또는 Load 메서드.

   // Initialize a single-panel status bar.  This is done
   // by setting the Text property and setting ShowPanels to False.
private:
   void InitializeSimpleStatusBar()
   {
      
      // Declare the StatusBar control
      StatusBar^ simpleStatusBar = gcnew StatusBar;
      
      // Set the ShowPanels property to False.
      simpleStatusBar->ShowPanels = false;
      
      // Set the text.
      simpleStatusBar->Text = "This is a single-panel status bar";
      
      // Set the width and anchor the StatusBar
      simpleStatusBar->Width = 200;
      simpleStatusBar->Anchor = AnchorStyles::Top;
      
      // Add the StatusBar to the form.
      this->Controls->Add( simpleStatusBar );
   }
// Initialize a single-panel status bar.  This is done
// by setting the Text property and setting ShowPanels to False.

private void InitializeSimpleStatusBar()
{

    // Declare the StatusBar control
    StatusBar simpleStatusBar = new StatusBar();

    // Set the ShowPanels property to False.
    simpleStatusBar.ShowPanels = false;

    // Set the text.
    simpleStatusBar.Text = "This is a single-panel status bar";

    // Set the width and anchor the StatusBar
    simpleStatusBar.Width = 200;
    simpleStatusBar.Anchor = AnchorStyles.Top;

    // Add the StatusBar to the form.
    this.Controls.Add(simpleStatusBar);
}
' Initialize a single-panel status bar.  This is done
' by setting the Text property and setting ShowPanels to False.
Private Sub InitializeSimpleStatusBar()

    ' Declare the StatusBar control
    Dim simpleStatusBar As New StatusBar

    ' Set the ShowPanels property to False.
    simpleStatusBar.ShowPanels = False

    ' Set the text.
    simpleStatusBar.Text = "This is a single-panel status bar"

    ' Set the width and anchor the StatusBar
    simpleStatusBar.Width = 200
    simpleStatusBar.Anchor = AnchorStyles.Top

    ' Add the StatusBar to the form.
    Me.Controls.Add(simpleStatusBar)

End Sub

설명

이 속성은 컨트롤에 표시되는 텍스트를 나타냅니다.

주의

컨트롤은 StatusBar 문자열의 처음 127자만 표시합니다.

적용 대상