Doumis
2011-03-02T15:40:28Z
Hi :)
Is there a way to extend or disable the built-in context menu (right click menu) of the iGrid?
I need to show my own context menu functions - I already know how to localize the built-in menu texts, but there's no way to influence the behaviour of the given functions.
When I implement my own context-menu in the click-event of the grid, the grid-context-menu is shown first and after another click my own context menu is shown. (I do not mean the custom text edit context menu!)
So is there a way to disable the built-in context menu?
Thanks in advance,
Thommy
Igor/10Tec
2011-03-03T07:08:24Z
iGrid provides the users with two built-in context menus - the header context menu and the cell context menu. I guess you mean the latter, but in any case, both context menus could not be extended - only localized.

iGrid's cell context menu contains the copy/paste commands. To suppress it at all, set the CopyPasteEnabled property to False. This will also cancel all the corresponding keyboard shortcuts such as CTLR+C/CTRL+V.

If you need to suppress this menu only for the right mouse click, you can always do that using the bDoDefault argument of such mouse events as MouseDown and MouseUp.
Doumis
2011-03-03T07:20:55Z
Hi Igor!!

Thank you so much for your quick answer!
For everyone else who wants to know how to disable the built-in context menu - here's the code:

Private Sub iGrid1_MouseUp(Button As Integer, Shift As Integer, ByVal x As Single, ByVal y As Single, ByVal lRow As Long, ByVal lCol As Long, bDoDefault As Boolean)
Select Case Button
    Case 2
        bDoDefault = False
End Select
End Sub

Thommy