[英]Adding custom menu item to ToolStripMenuItem's collection list
我正在構建自己的ToolStripMenuItem,並且希望它顯示在要添加到Menu的DropDownItems集合的選項列表中。 我怎么做?
到目前為止,這就是我所擁有的。
imports System.ComponentModel
''' <summary>
''' A list of check box items that remember which item is currently checked
''' </summary>
public class ToolStripCheckItemList : inherits ToolStripMenuItem
private itemsList as List(of Object)
event checkedItemChanged(sender as Object, e as EventArgs)
<Category("Items"), _
Description("The list of items contained in the check list.")>
public property items() as List(of Object)
set
End Set
Get
return itemsList
End Get
End Property
end class
這是我需要的屬性。 我把它放在班級名稱的正上方。
<ToolStripItemDesignerAvailabilityAttribute(ToolStripItemDesignerAvailability.MenuStrip)>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.