StatusBar::Text Property
.NET Framework (current version)
Gets or sets the text associated with the StatusBar control.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
This property represents the text displayed by the control.
Caution |
|---|
The StatusBar control displays only the first 127 characters of a string. |
The following code example demonstrates how to use the Text property. To run the example, paste the following code in a form. Call the InitializeSimpleStatusBar method in the form's constructor or Load method.
// 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 ); }
.NET Framework
Available since 1.1
Available since 1.1
Show:
