0

I'm building my own ToolStripMenuItem and I want it to show up in the list of choices to add to a Menu's DropDownItems collection. How do I do that?

Here's what I have so far.

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
4

1 回答 1

0

这是我需要的属性。我把它放在我的班级名称的正上方。

<ToolStripItemDesignerAvailabilityAttribute(ToolStripItemDesignerAvailability.MenuStrip)>
于 2014-09-05T17:00:06.990 回答