Welcome Guest Search | Active Topics | Sign In | Register

ContextMenu open on left-click? Options
Scott L
Posted: Thursday, May 31, 2007 11:43:57 AM
Rank: Member
Groups: Member

Joined: 5/30/2007
Posts: 15
I can't find this in the documentation.

Thanks...
eo_support
Posted: Thursday, May 31, 2007 12:11:40 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,080
ContextMenu is activated by right click by default. In order to activate it by left click, you will need to put in some code:

Code: HTML/ASPX
<a href="javascript:void(0)" 
onclick="eo_ShowContextMenu(event, 'ContextMenu1')">Show context menu</a>


Note here 'ContextMenu1' is the ID of your context menu. If you are using a server control, for example a Label, you can use the following code to associate it the context menu:

Code: C#
Label1.Attributes["onclick"] = "eo_ShowContextMenu(event, 'ContextMenu1')";


In this case ContextControlID is irrelevant.

Note left click may not always work because a lot of elements have a default action for left click, such as a button, a textbox, ect. Hooking up an onclick handler to those controls would obviously interfere those controls' default behavior.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.