ToolStripDropDownButton コンストラクタとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ToolStripDropDownButton コンストラクタの意味・解説 

ToolStripDropDownButton コンストラクタ (Image)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

指定したイメージ表示する ToolStripDropDownButton クラス新しインスタンス初期化します。

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

Dim image As Image

Dim instance As New ToolStripDropDownButton(image)
public ToolStripDropDownButton (
    Image image
)
public:
ToolStripDropDownButton (
    Image^ image
)
public ToolStripDropDownButton (
    Image image
)
public function ToolStripDropDownButton (
    image : Image
)

パラメータ

image

ToolStripDropDownButton に表示される Image

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ToolStripDropDownButton クラス
ToolStripDropDownButton メンバ
System.Windows.Forms 名前空間

ToolStripDropDownButton コンストラクタ (String)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

指定したテキスト表示する ToolStripDropDownButton クラス新しインスタンス初期化します。

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

Dim text As String

Dim instance As New ToolStripDropDownButton(text)
public ToolStripDropDownButton (
    string text
)
public:
ToolStripDropDownButton (
    String^ text
)
public ToolStripDropDownButton (
    String text
)
public function ToolStripDropDownButton (
    text : String
)

パラメータ

text

ToolStripDropDownButton に表示されるテキスト

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ToolStripDropDownButton クラス
ToolStripDropDownButton メンバ
System.Windows.Forms 名前空間

ToolStripDropDownButton コンストラクタ (String, Image)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

指定したテキストイメージ表示する ToolStripDropDownButton クラス新しインスタンス初期化します。

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

Dim text As String
Dim image As Image

Dim instance As New ToolStripDropDownButton(text,
 image)
public ToolStripDropDownButton (
    string text,
    Image image
)
public:
ToolStripDropDownButton (
    String^ text, 
    Image^ image
)
public ToolStripDropDownButton (
    String text, 
    Image image
)
public function ToolStripDropDownButton (
    text : String, 
    image : Image
)

パラメータ

text

ToolStripDropDownButton に表示されるテキスト

image

ToolStripDropDownButton表示される Image

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ToolStripDropDownButton クラス
ToolStripDropDownButton メンバ
System.Windows.Forms 名前空間

ToolStripDropDownButton コンストラクタ (String, Image, EventHandler)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

指定したテキストイメージ表示しClick イベント発生させる ToolStripDropDownButton クラス新しインスタンス初期化します。

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

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ToolStripDropDownButton クラス
ToolStripDropDownButton メンバ
System.Windows.Forms 名前空間

ToolStripDropDownButton コンストラクタ (String, Image, ToolStripItem[])

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

ToolStripDropDownButton クラス新しインスタンス初期化します。

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

Public Sub New ( _
    text As String, _
    image As Image, _
    ParamArray dropDownItems As ToolStripItem()
 _
)
Dim text As String
Dim image As Image
Dim dropDownItems As ToolStripItem()

Dim instance As New ToolStripDropDownButton(text,
 image, dropDownItems)
public ToolStripDropDownButton (
    string text,
    Image image,
    params ToolStripItem[] dropDownItems
)
public:
ToolStripDropDownButton (
    String^ text, 
    Image^ image, 
    ... array<ToolStripItem^>^ dropDownItems
)
public ToolStripDropDownButton (
    String text, 
    Image image, 
    ToolStripItem[] dropDownItems
)
public function ToolStripDropDownButton (
    text : String, 
    image : Image, 
    ... dropDownItems : ToolStripItem[]
)

パラメータ

text

ToolStripDropDownButton に表示されるテキスト

image

ToolStripDropDownButton表示される Image

dropDownItems

ToolStripDropDownButton の項目を格納する ToolStripItem 型の配列

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ToolStripDropDownButton クラス
ToolStripDropDownButton メンバ
System.Windows.Forms 名前空間

ToolStripDropDownButton コンストラクタ (String, Image, EventHandler, String)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

指定したテキストイメージ表示しClick イベント発生させる指定した名前の ToolStripDropDownButton クラス新しインスタンス初期化します。

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

public ToolStripDropDownButton (
    string text,
    Image image,
    EventHandler onClick,
    string name
)
public:
ToolStripDropDownButton (
    String^ text, 
    Image^ image, 
    EventHandler^ onClick, 
    String^ name
)
public ToolStripDropDownButton (
    String text, 
    Image image, 
    EventHandler onClick, 
    String name
)
public function ToolStripDropDownButton (
    text : String, 
    image : Image, 
    onClick : EventHandler, 
    name : String
)

パラメータ

text

ToolStripDropDownButton に表示されるテキスト

image

ToolStripDropDownButton表示される Image

onClick

Click イベントイベント ハンドラ

name

ToolStripDropDownButton の名前。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ToolStripDropDownButton クラス
ToolStripDropDownButton メンバ
System.Windows.Forms 名前空間

ToolStripDropDownButton コンストラクタ

ToolStripDropDownButton クラス新しインスタンス初期化します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
ToolStripDropDownButton () ToolStripDropDownButton クラス新しインスタンス初期化します。
ToolStripDropDownButton (Image) 指定したイメージ表示する ToolStripDropDownButton クラス新しインスタンス初期化します。
ToolStripDropDownButton (String) 指定したテキスト表示する ToolStripDropDownButton クラス新しインスタンス初期化します。
ToolStripDropDownButton (String, Image) 指定したテキストイメージ表示する ToolStripDropDownButton クラス新しインスタンス初期化します。
ToolStripDropDownButton (String, Image, EventHandler) 指定したテキストイメージ表示しClick イベント発生させる ToolStripDropDownButton クラス新しインスタンス初期化します。
ToolStripDropDownButton (String, Image, ToolStripItem[]) ToolStripDropDownButton クラス新しインスタンス初期化します。
ToolStripDropDownButton (String, Image, EventHandler, String) 指定したテキストイメージ表示しClick イベント発生させる指定した名前の ToolStripDropDownButton クラス新しインスタンス初期化します。
参照参照

関連項目

ToolStripDropDownButton クラス
ToolStripDropDownButton メンバ
System.Windows.Forms 名前空間

ToolStripDropDownButton コンストラクタ ()

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

ToolStripDropDownButton クラス新しインスタンス初期化します。

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

Dim instance As New ToolStripDropDownButton
public ToolStripDropDownButton ()
public:
ToolStripDropDownButton ()
public ToolStripDropDownButton ()
public function ToolStripDropDownButton ()
使用例使用例

ToolStripDropDownButton コントロール作成し初期化するコード例次に示します

' Declare the drop-down button and the items it will contain.
Friend WithEvents dropDownButton1 As
 ToolStripDropDownButton
Friend WithEvents dropDown As
 ToolStripDropDown
Friend WithEvents buttonRed As
 ToolStripButton
Friend WithEvents buttonBlue As
 ToolStripButton
Friend WithEvents buttonYellow As
 ToolStripButton

Private Sub InitializeDropDownButton() 
    dropDownButton1 = New ToolStripDropDownButton()
    dropDown = New ToolStripDropDown()
    dropDownButton1.Text = "A"
    
    ' Set the drop-down on the ToolStripDropDownButton.
    dropDownButton1.DropDown = dropDown

    ' Set the drop-down direction.
    dropDownButton1.DropDownDirection = ToolStripDropDownDirection.Left

    ' Do not show a drop-down arrow.
    dropDownButton1.ShowDropDownArrow = False

    ' Declare three buttons, set their foreground color and text, 
    ' and add the buttons to the drop-down.
    buttonRed = New ToolStripButton()
    buttonRed.ForeColor = Color.Red
    buttonRed.Text = "A"
    
    buttonBlue = New ToolStripButton()
    buttonBlue.ForeColor = Color.Blue
    buttonBlue.Text = "A"
    
    buttonYellow = New ToolStripButton()
    buttonYellow.ForeColor = Color.Yellow
    buttonYellow.Text = "A"
    
    dropDown.Items.AddRange(New ToolStripItem() {buttonRed, buttonBlue,
 buttonYellow})
    toolStrip1.Items.Add(dropDownButton1)
End Sub

' Handle the buttons' click event by setting the foreground color of
 the
' form to the foreground color of the button that is clicked.
Public Sub colorButtonsClick(ByVal
 sender As [Object], ByVal e As
 EventArgs) _
    Handles buttonRed.Click, buttonBlue.Click, buttonYellow.Click
    Dim senderButton As ToolStripButton = CType(sender,
 ToolStripButton)
    Me.ForeColor = senderButton.ForeColor

End Sub
// Declare the drop-down button and the items it will contain.
internal ToolStripDropDownButton dropDownButton1;
internal ToolStripDropDown dropDown;
internal ToolStripButton buttonRed;
internal ToolStripButton buttonBlue;
internal ToolStripButton buttonYellow;


private void InitializeDropDownButton()
{
    dropDownButton1 = new ToolStripDropDownButton();
    dropDown = new ToolStripDropDown();
    dropDownButton1.Text = "A";

    // Set the drop-down on the ToolStripDropDownButton.
    dropDownButton1.DropDown = dropDown;

    // Set the drop-down direction.
    dropDownButton1.DropDownDirection = ToolStripDropDownDirection.Left;

    // Do not show a drop-down arrow.
    dropDownButton1.ShowDropDownArrow = false;

    // Declare three buttons, set their foreground color and text, 
    // and add the buttons to the drop-down.
    buttonRed = new ToolStripButton();
    buttonRed.ForeColor = Color.Red;
    buttonRed.Text = "A";

    buttonBlue = new ToolStripButton();
    buttonBlue.ForeColor = Color.Blue;
    buttonBlue.Text = "A";

    buttonYellow = new ToolStripButton();
    buttonYellow.ForeColor = Color.Yellow;
    buttonYellow.Text = "A";
    
    buttonBlue.Click += new EventHandler(colorButtonsClick);
    buttonRed.Click += new EventHandler(colorButtonsClick);
    buttonYellow.Click += new EventHandler(colorButtonsClick);

    dropDown.Items.AddRange(new ToolStripItem[] 
        { buttonRed, buttonBlue, buttonYellow });
    toolStrip1.Items.Add(dropDownButton1);
}


// Handle the buttons' click event by setting the foreground color of
 the
// form to the foreground color of the button that is clicked.
public void colorButtonsClick(object sender,
 EventArgs e)
{
    ToolStripButton senderButton = (ToolStripButton)sender;
    this.ForeColor = senderButton.ForeColor;
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ToolStripDropDownButton クラス
ToolStripDropDownButton メンバ
System.Windows.Forms 名前空間



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

辞書ショートカット

すべての辞書の索引

「ToolStripDropDownButton コンストラクタ」の関連用語

ToolStripDropDownButton コンストラクタのお隣キーワード
検索ランキング

   

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



ToolStripDropDownButton コンストラクタのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS