I'm guessing this is glaring oversight on my part but I'm a bit stumped.
I have a ContextMenuStrip bound to a ListView. I also set the DropDown property of a DropDownButton (called ACTIONS) to be this ContextMenu as well so that I user can either right-click to get the Context Menu or, if they prefer, use the Actions button
The problem is that the very first time they right-click on an item in the Listview the context menu opens as if they'd clicked the Actions button (i.e. it opens the context menu below the Actions button). This only happens the first time though. Every other time they right click on the listview it opens the context menu in the correct location (i.e. over the listview itself).
If I remove the ContextMenuStrip from the DropDown property of the button and assign it code, like this
then it works as expected. Is that the preferred method?
I have a ContextMenuStrip bound to a ListView. I also set the DropDown property of a DropDownButton (called ACTIONS) to be this ContextMenu as well so that I user can either right-click to get the Context Menu or, if they prefer, use the Actions button
The problem is that the very first time they right-click on an item in the Listview the context menu opens as if they'd clicked the Actions button (i.e. it opens the context menu below the Actions button). This only happens the first time though. Every other time they right click on the listview it opens the context menu in the correct location (i.e. over the listview itself).
If I remove the ContextMenuStrip from the DropDown property of the button and assign it code, like this
Code:
Dim ActionsMenuItems As New ContextMenuStrip
ActionsMenuItems = Me.ContextMenuUsers
Me.ActionsDropDownButton.DropDown = ActionsMenuItems