Post by The Hated Man on Sept 3, 2015 9:01:35 GMT 10
My awesomium web browser project Context Menu is not showing after righ click. I create a webcontrolcontextmenu and add webcontrol properties contextmenu but not work. How can I fix it?
Nick change Alsahhim to The Hated Man.
C# , VB.Net , Adobe
Turkish Coder
|
|
Post by Nathan Lecompte on Sept 3, 2015 11:17:27 GMT 10
You have to make it show using the WebControl's ContextMenu sub.
|
|
Post by The Hated Man on Sept 16, 2015 9:58:42 GMT 10
I add a WebControl's ContextMenu and select my webcontrol contextmenu --> WebControl's ContextMenu. But not work.
Nick change Alsahhim to The Hated Man.
C# , VB.Net , Adobe
Turkish Coder
|
|
Post by Nathan Lecompte on Sept 16, 2015 14:11:46 GMT 10
Yeah that wont work completely, you have to make it show via the WebControl's ContextMenu sub.
|
|
Post by The Hated Man on Sept 16, 2015 19:26:55 GMT 10
Which code should I write ?
Nick change Alsahhim to The Hated Man.
C# , VB.Net , Adobe
Turkish Coder
|
|
Post by Nathan Lecompte on Sept 16, 2015 20:48:00 GMT 10
When your in "code view", there should be 2 drop-down menu's at the top of the editor. In the 1st drop-down select the WebControl, in the 2nd select "ShowContextMenu". It will then automatically generate the sub for the Context Menu function in the code view. In the sub you need to make sure to handle the Context menu (basically make it available as a function) like this: e.Handled = True And then you can also hide/show certain menu items like this: If e.Info.MediaType = MediaType.Image Then SaveImgBtn.Show() End If It should overall look a little something like this: Private Sub WebControl1_ShowContextMenu(sender As Object, e As Awesomium.Core.ContextMenuEventArgs) Handles WebControl1.ShowContextMenu 'To make sure it shows up/is available as a function e.Handled = True
'Functions for buttons If e.Info.MediaType = MediaType.Image Then SaveImgBtn.Show() End If End Sub Hope this helps!
|
|
Post by The Hated Man on Sept 17, 2015 1:23:33 GMT 10
|
|
Post by The Hated Man on Sept 21, 2015 20:03:49 GMT 10
Help Meee
Nick change Alsahhim to The Hated Man.
C# , VB.Net , Adobe
Turkish Coder
|
|
Post by Nathan Lecompte on Sept 22, 2015 0:30:01 GMT 10
Try testing it first (to see whether the sub is actually functioning). Just make a MsgBox show up in the ShowContextMenu sub and tell me if it shows up
|
|
Post by The Hated Man on Sept 23, 2015 3:05:54 GMT 10
It's work. If press right click , showing msgbox. But I try, I didn't use msgbox , I use awesomiumcontextmenu1.Show() but not work.
Nick change Alsahhim to The Hated Man.
C# , VB.Net , Adobe
Turkish Coder
|
|