[英]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.