ToolBar.ToolBarButtonCollection.RemoveAt メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ToolBar.ToolBarButtonCollection.RemoveAt メソッドの意味・解説 

ToolBar.ToolBarButtonCollection.RemoveAt メソッド

ツール バー ボタン コレクションから指定したボタン削除します

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

Public Sub RemoveAt ( _
    index As Integer _
)
Dim instance As ToolBarButtonCollection
Dim index As Integer

instance.RemoveAt(index)
public void RemoveAt (
    int index
)
public final void RemoveAt (
    int index
)

パラメータ

index

コレクション内の ToolBarButton のインデックス位置

例外例外
例外種類条件

ArgumentOutOfRangeException

index の値が 0 未満か、コレクション内のボタン数を超えてます。

解説解説
使用例使用例

ToolBar 上の最後ToolBarButton削除するコード例次に示しますToolBarButton コレクションインデックス値は 0 から始まるため、削除されツール バー ボタンインデックス値は Count プロパティ等しい値か、プロパティの値から 1 を引いた値が設定されます。

Public Sub RemoveMyButton()
    Dim btns As Integer
    btns = toolBar1.Buttons.Count
    
    ' Remove the last toolbar button.
    toolBar1.Buttons.RemoveAt(btns - 1)
End Sub

public void RemoveMyButton()
 {
    int btns;
    btns = toolBar1.Buttons.Count;
 
    // Remove the last toolbar button.
    toolBar1.Buttons.RemoveAt(btns - 1);
 }
   
public:
   void RemoveMyButton()
   {
      int btns;
      btns = toolBar1->Buttons->Count;
      
      // Remove the last toolbar button.
      toolBar1->Buttons->RemoveAt( btns - 1 );
   }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ToolBar.ToolBarButtonCollection クラス
ToolBar.ToolBarButtonCollection メンバ
System.Windows.Forms 名前空間
Clear
ToolBarButton
Add


このページでは「.NET Framework クラス ライブラリ リファレンス」からToolBar.ToolBarButtonCollection.RemoveAt メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からToolBar.ToolBarButtonCollection.RemoveAt メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からToolBar.ToolBarButtonCollection.RemoveAt メソッド を検索

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

辞書ショートカット

すべての辞書の索引

ToolBar.ToolBarButtonCollection.RemoveAt メソッドのお隣キーワード
検索ランキング

   

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



ToolBar.ToolBarButtonCollection.RemoveAt メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS