On form i use menustrip. one menu from strip i have used as Context menu of listview .
But whenever i Rightclick on listview - to show context menu, that menu from Menustrip gets removed.
how can i keep manu on both places- on Menustrip and as context menu
Thanks.
Loading
sheetalw wattamwarPosted Mar 12, 2010, 1:01 AM
Please help.
Sam HobbsPosted Mar 11, 2010, 2:47 AM
sheetalw wattamwarPosted Mar 11, 2010, 12:53 AM
This is my code, please tell me another way so above problem will removed.
tpSeqListView is name of my listview control.
storiesMenu is one of the manu name from Menu strip. - storiesMenu has other 5 submenu as New,Insert,InsertAfter,Edit,Close.
these subitems i want to show on rightclick on Listview. Hope u understand now.
private void tpSeqListView_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
ContextMenuStrip ctxMenuStrip = new ContextMenuStrip();
ctxMenuStrip.Items.Add(storiesMenu );
ctxMenuStrip.Show(tpSeqListView, e.Location);
}
}
when i run my application, storiesMenu item is shown on menustrip. After that if I rightclick storiesMenu is shown on listview but it gets removed from Menustrip until i run apllication once again.
I want to allow user to acces this menu in both ways.
Sam HobbsPosted Mar 10, 2010, 12:05 PM