我正在构建自己的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)>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句