contextmenu

How can I create multiple context menus?

久未见 提交于 2019-12-05 16:12:57
I have 1 activity, but would like to have multiple context menu's for different UI components. For example, I have a ListView which will react to: @Override public void onCreateContextMenu(ContextMenu menu, View v,ContextMenuInfo menuInfo) { super.onCreateContextMenu(menu, v, menuInfo); menu.setHeaderTitle("Selection Options"); menu.add(0, v.getId(), 0, "Remove"); } How can I create another context menu for the onClick event for an ImageView I have? Actually, this method is to change the option menu dynamically. To create several context menus, you have to define them in your method

PATH variable different when cmd was run through the context menu

纵饮孤独 提交于 2019-12-05 15:59:22
I just spent the last hour on trying to find out why the hell my PATH variable wasn't updating for my cmd.exe. Now I figured out that it kind of did update, but only for certain conditions... I updated it via Win+Break -> Change Settings -> Advanced -> Environment Variables... Now when I open a new commandline via Win+R -> cmd -> Enter the PATH variable shows whatever I set it to. But when I open a new commandline via Shift+Rightclick into folder -> Open command window here , the PATH variable shows outdated content. My question: Why is this happening, what can I do about it? As pointed out by

How to re-enable the context menu in this case?

萝らか妹 提交于 2019-12-05 13:54:25
问题 document.addEventListener('contextmenu', function (e) { e.preventDefault() e.stopPropagation() e.returnValue = false e.cancleBubble = true }) No way? Edit: document.oncontextmenu = null does not work. P.S. I cannot have the reference of the listener function since I am not the owner of the site preventing the context menu. 回答1: If you are really desperate, try adding this before the addEventListener is called. It works in both FF and Chrome. I didn't check anything else. document

Pass multiple files / folders from windows explorer to external application

流过昼夜 提交于 2019-12-05 13:33:32
Hi does anyone know how to get windows explorer to pass multiple files / folders through to an external app (c#) referenced in the registry? I am current able to act upon a single file / folder using the %1 syntax but not sure how to get explorer to pass through multiple items. Does anyone know how to do this? When you select multiple files in Explorer, your shell context menu extension's IShellExtInit::Initialize method will be called and pdtobj contains the selection. Note writing managed shell extension is not supported. I don't think this is possible. When you open multiple files using

Receiving arguments from Windows Context menu

荒凉一梦 提交于 2019-12-05 12:44:12
I have done this before but for the life of me can't remember how to do this... In my explorer context menu I added a new entry (go to regedit...go to HKEY_CLASSES_ROOT...bla bla bla)... Now when I click on my option I want to pass in the file path, file name, those kind of things to my application...and then use it there? The default value of the .ext\shell\open\command key should contain the path to your .exe with the "%1" argument. Explorer substitutes that with the full path to the file. Which you can read in your .exe through the Main() method argument or Environment.GetCommandLineArgs().

How can I test context menu functionality in a web app?

早过忘川 提交于 2019-12-05 12:31:54
I'm playing with a grails app that has a contextmenu (on right-click). The context menu is built using Chris Domigan's jquery contextmenu plugin . While the contextmenus do actually work, I want to have automated tests, and I can't work out how to do it. I've tried Selenium 2.05a (ie. Webdriver), but there's no rightClick method. I notice that HtmlUnit has a rightclick method, but I don't seem to be able to detect any difference in the DOM between before the click and after it. Currently there's no right click method in WebDriver, there's an enhancement request opened for it - http://code

Context menu on nested child element also shows parent context menu

僤鯓⒐⒋嵵緔 提交于 2019-12-05 11:10:11
I have multiple DOM elements with context menus. When one element is a child of the other and I invoke the context menu of the inner child, I also see the context menu from the parent. This is implemented with the jquery-ui.contextmenu plugin. Is there a way to configure the plugin to prevent the parent's menu from being shown or am I going to have to handle all the click events manually and filter them so I show only the menu I want? Following is my code: HTML: <!-- Add a child which will have a context menu --> <div class="outer-child" id="outer-child"> Outer Child <!-- inner child with its

How to attach context menu to TChromium browser

爱⌒轻易说出口 提交于 2019-12-05 10:44:04
I have a TChromium broser from Delphi Chromium Embedded (http://code.google.com/p/delphichromiumembedded). I would like to attach a context menu to it. How I can achieve that? You need to handle the OnBeforeMenu event. In that event handler is enough to set the output parameter Result to True what will suppress the default context menus to popup. After that you can display your own menu on the positions obtained from the menuInfo structure. Here's the code sample with a custom popup menu: uses ceflib, cefvcl; procedure TForm1.FormCreate(Sender: TObject); begin Chromium1.Load('www.example.com')

VS2010 Add Service Reference missing (Unable to add Service Reference)

十年热恋 提交于 2019-12-05 08:00:51
I have an issue that seems to be identical to this question . I am unable to add a service reference to any project in Visual Studio. I went so far as to format the entire computer, re-install Windows (Windows 7 Ultimate), and VS2010 Professional. Twice. This is a work computer that I inherited and I find it odd that, even after formatting the drive and reinstalling everything, I cannot add a service reference to any project on this computer. I am 100% certain that .NET 3.5 is being targeted in my project's settings and even created an empty project to try it out. Same results. I am not sure

add icon and separator to windows XP right click context menu

怎甘沉沦 提交于 2019-12-05 07:38:16
问题 I need to add an icon to custom right click context menu and a separator before and after the menu items i added to right click menu for windows XP, I found some solutions that work for windows 7 but i an searching it for windows XP, Kindly help. For example you we can see the image of Tortoise SVN also the separator before and after the menu item. 回答1: Try Add custom entry to Windows XP explorer context menu and this might help you too. You can customize the context menu using Ultimate