Sky Software Homepage LogicNP Software Knowledge Base And FAQ

 
Contact Product Support    SearchSearch      Subscribe to the RSS feed for this forum

HOWTO : Display a different context menu than the default system context menu.

 
Subscribe to the RSS feed for this forum  Forum Index -> FolderView.Net/WPF
View previous topic :: View next topic  
Author Message
Support



Joined: 18 Jul 2005
Posts: 731

Posted: Wed Jun 18, 2008 10:59 am    Post subject: HOWTO : Display a different context menu than the default system context menu.

To display your own context menu (or context menu strip) instead of the default system context menu, use the PopupContextMenu event as follows :

[C# ]
private void fldrView_PopupContextMenu(object sender, LogicNP.FolderViewControl.PopupContextMenuEventArgs e)
{
// This prevents FolderView from displaying its own context menu
e.Cancel = true;

// Show your own menu(strip) instead
contextMenuStrip1.Show(Control.MousePosition);
}


[VB .Net]
Private Sub fileView_PopupContextMenu(ByVal sender As System.Object, ByVal e As LogicNP.FileViewControl.PopupContextMenuEventArgs) Handles fileView.PopupContextMenu
' This prevents FolderView from displaying its own context menu
e.Cancel = True

' Show your own menu(strip) instead
contextMenuStrip1.Show(Control.MousePosition)
End Sub
Back to top
Display posts from previous:   
Forum Index -> FolderView.Net/WPF All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group