I add rows (elements) dynamically to ToolStripItemCollection:
Dim onClickHandler As System.EventHandler = New System.EventHandler(AddressOf Symbol_Click)
Dim item As New ToolStripMenuItem(newSymbol, Nothing, onClickHandler)
SomeToolStripMenuItem.DropDownItems.Add(item)
Thus, elements are not added at a time, but one after the other based on external triggers throughout the entire program session. I would like to sort the drop-down list every time I add a new item. What are my options for achieving this?
source
share