ツールストリップに追加したアイテムの使用方法を理解しようとしています。以下は私が使用しているコードです。ツールストリップに「test1、test2」という項目をいくつか追加しましたが、それらを選択してクリック イベントのコードを追加するにはどうすればよいですか?
ありがとう。
Public Class MenuStripCustom
Inherits MenuStrip
Private WithEvents NavToolStrip As New ToolStripMenuItem("File")
Sub New()
Dim tsi As New ToolStripMenuItem
Dim tsi2 As New ToolStripDropDownButton
Me.Items.Add(NavToolStrip)
NavToolStrip.DropDownItems.Add("test1")
NavToolStrip.DropDownItems.Add("test2")
End Sub
Private Sub NavToolStripDropDownButton_Click(sender As Object, e As EventArgs) Handles NavToolStrip.DropDownItemClicked
' What do I put here to handle different drop down items?
' ie. select case (dropDownItem)
' case: test1?
End Sub
クラス終了