Do not post any licensing information in this forum.
So I implemented the event contextmenustrip_Opening and set $_.Cancel = $true. The result is that it does not appear anywhere. I try to figure out, where the user clicked but that seems to be hard.... I did:
$control = $contextmenustrip1.SourceControl
$control contains always System.Windows.Forms.TabControl, TabPages.Count: 3, ..... etc, whatever the toString method returns. I rather would expect something like treecontrol1 or GridListView1 etc. How do I get this information? In the Opening Event I like to build a context menu depending on the control where the user clicked.
For your convenience, when you drop a ContextMenuStrip in the designer, PrimalForms will automatically assign the ContextMenuStrip to any control you drop it on.
So I have set the property 'ContextMenuStrip' of the datagridview where I like to show it up to 'contextmenustrip1'. But it still shows up everywhere.... Does it mean I have to create it manually e.g. on FormLoad WITHOUT the designer and then assign it to the mentioned propertiy?
Who is online
Users browsing this forum: No registered users and 1 guest