StatusBar.Text プロパティとは? わかりやすく解説

StatusBar.Text プロパティ

StatusBar コントロール関連付けられているテキスト取得または設定します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

解説解説
使用例使用例

Text プロパティ使用する方法次のコード例示します。この例を実行するには、次のコードフォーム貼り付けます。そして、フォームコンストラクタまたは Load メソッドInitializeSimpleStatusBar メソッド呼び出します。

' 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
// 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:
   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.set_ShowPanels(false);
    // Set the text.
    simpleStatusBar.set_Text("This is a single-panel status bar");
    // Set the width and anchor the StatusBar
    simpleStatusBar.set_Width(200);
    simpleStatusBar.set_Anchor(AnchorStyles.Top);
    // Add the StatusBar to the form.
    this.get_Controls().Add(simpleStatusBar);
} //InitializeSimpleStatusBar 
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「StatusBar.Text プロパティ」の関連用語

StatusBar.Text プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



StatusBar.Text プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS