ToolStripDropDownButton コンストラクタ (Image)
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文
プラットフォーム
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
ToolStripDropDownButton コンストラクタ (String)
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文
プラットフォーム
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
ToolStripDropDownButton コンストラクタ (String, Image)
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
ToolStripDropDownButton コンストラクタ (String, Image, EventHandler)
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文
Dim text As String Dim image As Image Dim onClick As EventHandler Dim instance As New ToolStripDropDownButton(text, image, onClick)
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
ToolStripDropDownButton コンストラクタ (String, Image, ToolStripItem[])
アセンブリ: 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, ... array<ToolStripItem^>^ dropDownItems )
public function ToolStripDropDownButton ( text : String, image : Image, ... dropDownItems : ToolStripItem[] )
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
ToolStripDropDownButton コンストラクタ (String, Image, EventHandler, String)
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文
Public Sub New ( _ text As String, _ image As Image, _ onClick As EventHandler, _ name As String _ )
Dim text As String Dim image As Image Dim onClick As EventHandler Dim name As String Dim instance As New ToolStripDropDownButton(text, image, onClick, name)
public function ToolStripDropDownButton ( text : String, image : Image, onClick : EventHandler, name : String )
- name
ToolStripDropDownButton の名前。
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
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 コンストラクタ ()
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文
使用例
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; }
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
参照
- ToolStripDropDownButton コンストラクタのページへのリンク