contextmenu

Add icon to child context menu

你离开我真会死。 提交于 2019-11-28 21:32:41
I want to add an icon to my child context menus. But right now, the chrome extension options for context menu doesnt provide any option to add icon while creating a child menu. I can add icon to the parent menu using the icon parameter in manifest file . But no option for the child menu. Any idea how I might achieve this? Sorry, it is currently not possible. All you got is that one parent icon set through manifest. A possible workaround is using Unicode Symbols : Adapted code from this Google sample : // Create a parent item and two children. chrome.contextMenus.create({"title": "⛔ Parent",

Google Map V3 context menu

跟風遠走 提交于 2019-11-28 20:46:37
I am looking for a Google Map V3 context menu library. I have found some code examples here Gizzmo's blog Google API tips GMap3 How I got .. Stack overflow question Google maps v3 - Contextual menu available? of April also just came up with the above examples. So did Gmap3 adding a simple context menu . But maybe somebody has encapsulated the examples in a reusable library or found something in the meantime. Obviously there was something for V2. -- Updated 2012-05-31 -- I have found another one http://googlemapsmania.blogspot.de/2012/04/create-google-maps-context-menu.html , but did not have

How to reference right-clicked object in WPF Context Menu item click event handler?

感情迁移 提交于 2019-11-28 19:47:59
In WPF application there is a Grid with a number of objects (they are derived from a custom control). I want to perform some actions on each of them using context menu: <Grid.ContextMenu> <ContextMenu> <MenuItem Name="EditStatusCm" Header="Change status" Click="EditStatusCm_Click"/> </ContextMenu> </Grid.ContextMenu> But in the event handler I cannot get know which of the objects was right-clicked: private void EditStatusCm_Click(object sender, RoutedEventArgs e) { MyCustControl SCurrent = new MyCustControl(); MenuItem menu = sender as MenuItem; SCurrent = menu.DataContext as MyCustControl; //

how to add a right click menu to each cell of QTableView in PyQt

爷,独闯天下 提交于 2019-11-28 19:43:33
I want to add a right click menu to delete, rename or open image in each of cell of QTAbleView in the rigt click menu, I have tried and found everyone is trying to add menu to a header in tableview, i tried below but that seems not working in the code below.. class GalleryUi(QtGui.QTableView): """ Class contains the methods that forms the UI of Image galery """ def __init__(self, imagesPathLst=None, parent=None): super(GalleryUi, self).__init__(parent) self.__sw = QtGui.QDesktopWidget().screenGeometry(self).width() self.__sh = QtGui.QDesktopWidget().screenGeometry(self).height() self._

How to navigate with keyboard through <ul> <li> element [duplicate]

雨燕双飞 提交于 2019-11-28 18:24:41
Possible Duplicate: KeyBoard Navigation for menu using jquery I created a menu using <ul> <li> tags and showing it to the user when he presses Enter key in the textbox. He can select items of the menu (navigate in menu) using mouse but I want also to allow him to select items from that menu using up/dow buttons of the keyboard for example. Is it any way to do that using jQuery or CSS? My menu has following structure: <div class="services"> <div class="items"> <ul> <li class="mail-icon"><a href="#" id="mail"><?php echo $langmsg['mail']; ?></a></li> <li class="forum-icon"><a href="#" id="forum">

Run Python Script on Selected File

微笑、不失礼 提交于 2019-11-28 16:51:45
问题 I would like to write a python script that would upload any file I select in Windows Explorer. The idea is to select any file in Windows Explorer, right-click to display file's Context Menu and select a command from there... something like "Upload to Web Server". After the command is selected, the Python runs a script which receives the file-path and a file name of the file to be uploaded. The writing the Python script that will upload the file to web seems to be straightforward. What is

get view id from oncontextitemselected

懵懂的女人 提交于 2019-11-28 13:43:18
I've several buttons registered for context menu how do I know which button was clicked for the menu to appear? below is the pseudocode that i'll be using. I need to do something related to which button clicked (I have few more buttons to be declared), how do I know that the context menu is activated from which button click. EDIT: I think i didn't make myself clear, I wanted to know which button was clicked for the menu to appear. Not which menu item is clicked. Anyways, I've a solution which I'll add in pretty soon. thanks private static final int SEND_AS_TEXT = Menu.FIRST; private static

chrome extension context menus, how to display a menu item only when there is no selection?

跟風遠走 提交于 2019-11-28 12:11:44
What I want to do is: if the user does not select anything, display menu item A; if the user selects something, display menu item B. So far what I can get is: if the user does not select anything, display menu item A; if the user selects something, display both A and B. I want to know: how to make item A disappear when there is selection? Many thanks! Below is my code: var all = chrome.contextMenus.create ({ "title": "A", "contexts":["page"], "onclick": doA }); var selection = chrome.contextMenus.create ({ "title": "B", "contexts":["selection"], "onclick": doB }); You would need to inject a

wpf listview right-click problem

依然范特西╮ 提交于 2019-11-28 10:08:54
so I have attached a context menu (right-click menu) to a wpf listview. unfortunately, when you right-click it brings up both the menu and selects whatever item you are over. Is there a way to shut off this right-click select behavior while still allowing the context menu? The key is setting the PreviewMouseRightButtonDown event in the correct place. As you'll notice, even without a ContextMenu right clicking on a ListViewItem will select that item, and so we need to set the event on each item, not on the ListView. <ListView> <ListView.ItemContainerStyle> <Style TargetType="{x:Type

Adding a context menu item in Windows for a specific file extension

孤街浪徒 提交于 2019-11-28 10:03:56
问题 I am trying to add a context menu item to a DLL file. The reason is that I have written an application which retracts and deployed a managed DLL file to the GAC. The application is all good, but now I want the ability to right-click a DLL and just click "copy to GAC". I've tried to follow instructions as per this question: How add context menu item to Windows Explorer for folders but to no avail. When I right click a DLL, nothing new is appearing. I've also tried the following: https:/