T
Tom Bean
I am trying to display a ContextMenuStrip when a user right-clicks on an
item in a ListView and have encountered a something that seems strange to
me.
When the ListView is initially populated, no items are selected. When the
first item is selected by clicking either the left or right button, the
SelectedIndexChanged event fires but not the MouseUp event. After the first
item is selected and another item clicked on, both the SelectedIndexChanged
and MouseUp events fire.
Since I am calling Show() for the context menu in the MouseUp event when the
right button is clicked, no context menu is displayed when the first
selection is made by right-clicking an item.
Can anyone tell me if it is normal behavior for the MouseUp event not to
fire when the first selection is made? Is there any way to ensure the
context menu is displayed for the first selection?
Thanks,
Tom
item in a ListView and have encountered a something that seems strange to
me.
When the ListView is initially populated, no items are selected. When the
first item is selected by clicking either the left or right button, the
SelectedIndexChanged event fires but not the MouseUp event. After the first
item is selected and another item clicked on, both the SelectedIndexChanged
and MouseUp events fire.
Since I am calling Show() for the context menu in the MouseUp event when the
right button is clicked, no context menu is displayed when the first
selection is made by right-clicking an item.
Can anyone tell me if it is normal behavior for the MouseUp event not to
fire when the first selection is made? Is there any way to ensure the
context menu is displayed for the first selection?
Thanks,
Tom