contextmenu

CKEditor - get element after click on context Menu

社会主义新天地 提交于 2019-12-23 08:55:08
问题 I added link to context menu of img in ckeditor, using this code CKEditor - Add Context Menu Item to Images How can I get the information about the image, on which user clicked? For example the id of the image. Or the path. In order to process with the selected image. 回答1: The solution was pretty easy. $('body').on('contextmenu','img',function(){ var imgid = $(this).attr('id'); alert(imgid); }) Using jquery to track click on image, we can save it's id to global variable. Then, inside the

Get menuitem from context menu in firefox

与世无争的帅哥 提交于 2019-12-23 05:25:46
问题 I've written a Firefox extension which appends a menuitem onto the context menu and now i want to hide the item unless context of the click is on text. For some reason the oncontextmenu event is never triggered ('context opened' is not shown on screen). I've tried changing the to but still no alert being fired, anyone got an idea what i might be doing wrong here? thanks! <?xml version="1.0"?> <overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script> function

Creating a checkable context menu from a list of enum values

删除回忆录丶 提交于 2019-12-23 05:18:17
问题 I see lots of people asking questions similar to mine, but so far I haven't been able to put the pieces together to solve my problem. I have a certain enum type (let's call it MyCustomEnum ) which I'd like to use to create the list of choices in a ContextMenu . I'd like the menu items to be checkable, and have the checked MenuItem bound to a static setting the application uses (a property we'll call MyCustomEnumSetting on the settings class MyCustomSettingsClass ). So far, I'm able to

How to obtain full shell context menu of right-click a folder background

送分小仙女□ 提交于 2019-12-23 05:12:31
问题 I can obtain shell interface IShellView , and I can get its context menu of right click the folder view's white area (background), following is my code: ... IShellFolder* psf = NULL; HRESULT hr = psfDesk->BindToObject(g_pidlSelectingFolder, NULL, IID_PPV_ARGS(&psf)); ... IShellView* pShellView = NULL; if (FAILED(psfSelf->CreateViewObject(hParent, IID_PPV_ARGS(&pShellView)))) return; IContextMenu3* pcm3 = NULL; hr = pShellView->GetItemObject(SVGIO_BACKGROUND, IID_IContextMenu3, (LPVOID*)&pcm3)

Create context-menu entries for a given extension

蓝咒 提交于 2019-12-23 04:50:07
问题 It is possibe to create context menu entries for Window's File Explorer for all files by creating registry entries such as [HKEY_CLASSES_ROOT\*\shell\kdb-test] @="Test (*,kdb-test)" [HKEY_CLASSES_ROOT\*\shell\kdb-test\command] @="cmd.exe /c type %1 & pause" It is also possible to create them for a given extension by replacing \* \ by \.extension\ . However, I have found that the latter doesn't work reliably. For instance, [HKEY_CLASSES_ROOT\.regshelltest\shell\kdb-test] @="Test (.regshelltest

Context menu creation

喜你入骨 提交于 2019-12-23 04:49:10
问题 I have made simple menu. Now how can I make a context menu? 回答1: just register for context menu in onCreate method @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); TextView tv = (TextView)this.findViewById(R.id.textViewId); registerForContextMenu(this.getTextView()); } create ContextMenu here by adding item @Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { menu

Creating a contextual menu when long pressing item in android

拟墨画扇 提交于 2019-12-23 04:24:31
问题 I am creating a checklist and it allows the user to add new items to the list, I am trying to allow the user to delete an item when they want to. So I am creating a contextual menu using this that comes us when the user long-presses an item in the list. Right now, it recognizes the long-press but nothing happens, so the contextual menu doesn't appear. Here is my activity page: (ViewTask.java) package com.example.androidhive; import java.util.ArrayList; import java.util.List; import android.os

Extending windows explorer context menu

孤者浪人 提交于 2019-12-23 03:41:51
问题 I'm having hard times figuring out why this doesn't work on my computer. I've read this article http://msdn.microsoft.com/en-us/library/bb776820.aspx and tried it, and it works for an unknown file type, but for know such as .bmp it doesn't - I've also deleted other keys under .bmp - didn't help. I've tried this in HKEY_CLASSES_ROOT.bmp and in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.bmp I need to implement this in my program so it has custom context menu

how to create menu bar at bottom of the activity using 4.0.3 SDK

倖福魔咒の 提交于 2019-12-23 03:37:09
问题 I am creating a menu in 4.0.3, according to documentation it always shows menu bar at the top of my activity but i want to show it at the bottom of my activity like that.How can i achieve this? Currently i am using the following code. public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the

jQuery Hover Menu disappears when right click

Deadly 提交于 2019-12-23 02:16:56
问题 I have a Menu that opens when hovering. But on right click the menu disappears when the contextmenu opens. But I can't figure out why. I need the hover menu open at the same time with contextmenu/right click. The jQuery Code (Version jquery-1.11.2.min.js) : jQuery(document).on('mouseover','#main_menu',function() { jQuery('#main_menu_inner').show(); }); jQuery(document).on('mouseleave','#main_menu',function() { jQuery('#main_menu_inner').hide(); }); The HTML: <div id="main_menu"> <img id="menu