contextmenu

Showing a Windows context menu for multiple items

我只是一个虾纸丫 提交于 2020-01-01 18:15:08
问题 I have an application that lists files, and I allow the user to right-click on a file and my application shows the Windows context menu for the selected file. I use SHParseDisplayName to get a pidl for a filename. Then I bind to the parent object: IntPtr pidlLast = IntPtr.Zero; SHBindToParent(pidl, typeof(IShellFolder).GUID, out oShellFolder, out pidlLast); After I have the parent I can get build the context menu: IntPtr result = IntPtr.Zero; IShellFolder shellFolder = (IShellFolder

How do I make context menus for my software?

∥☆過路亽.° 提交于 2020-01-01 12:47:17
问题 So the idea is to make an encryption software which will work only on .txt files and apply some encryption functions on it and generate a new file. To avoid the hassle of user having to drag-and-drop the file, I have decided to make an option similar to my anti-virus here. I want to learn how to make these for various OS, irrespective of the architecture :) What are these menus called? I mean the proper name so next time I can refer to them in a more articulate way How to make these? My

getting hyperlink text on Chrome right click

允我心安 提交于 2020-01-01 11:39:11
问题 In the Chrome extension I'm working on right now, there's a situation where if the user right-clicked on this link: <a href="http://www.google.com">Hello</a> and selected a certain option from my extension's context menu, I need the string "Hello" to be captured in some form. As the Context Menus API shows, it's easy to capture text from a right-clicked selection or the actual URL of the hyperlink (in this case, Google.com) , since these appear in OnClickData, but I'm not sure how I would

How to add item into popup copy/paste menu on a android selected textview?

a 夏天 提交于 2020-01-01 08:52:52
问题 please look this screenshot. In normal case, when text be selected, a popup menu opened, but only have cut/paste item. I want to know, how to add item just like this "web search / share" into this popup menu? What's this popup menu? I had tried to override Activity Context or Option Menu, but it' not. I had also tried to extends TextView and override it's Context menu, but no use, only show a normal dialog context menu, and this cut/paste menu disappered. 回答1: Before the api23,I have no ideal

Android GridView OnItemLongClick listener called after OnItemClick

巧了我就是萌 提交于 2020-01-01 05:50:25
问题 Basically I want to show a different context menu when the user short clicks or long clicks on a cell in the grid view. The issue I have is that if the user short clicks the OnItemClick listener is called and I see the debugger reach the code that shows the context menu but rather than moving from there to onCreateContextMenu it goes to onItemLongClick. I have tried using a Boolean to prevent the long click code being executed which does prevent that code being executed, however even when

How to display a Windows 7 style context menu?

孤街醉人 提交于 2020-01-01 05:43:10
问题 In my .NET applications, context menus look like the left one. How can I apply the Windows 7 style on them in order to make them look like the right one? 回答1: Right-click the tool box, Choose Items. Tick "ContextMenu", the one with Namespace = System.Windows.Forms and Directory = Global Assembly Cache. This .NET 1.x component is distinct from ContextMenuStrip, it uses native Windows menus. You'll lose some capabilities, I doubt you care. You'll need to write a line of code to assign the menu,

ContextMenu for ListViewItem only

杀马特。学长 韩版系。学妹 提交于 2020-01-01 05:27:08
问题 I have a context menu - problem is I need it to only open when a listviewitem is clicked. Right now it will open if I click anywhere in the listview or in the header. <ListView> <ListView.ContextMenu> <ContextMenu> <MenuItem Header="More Info" Command="{Binding MoreInfo}" /> </ContextMenu> </ListView.ContextMenu> <ListView.View> <GridView> <!-- columns and stuff here --> </GridView> </ListView.View> </ListView> I have tried adding the ContextMenu as a resource and applying it as a style, but

context menu for removing items in listview

戏子无情 提交于 2019-12-31 13:14:15
问题 I have a ListView which displays a list of string values. I want to add a context menu entry for each item in the list to remove the selected item. My XAML looks like this: <ListView x:Name="itemsListView" ItemsSource="{Binding MyItems}"> <ListView.ContextMenu> <ContextMenu> <MenuItem Header="Remove" Command="{Binding RemoveItem}" CommandParameter="{Binding ElementName=itemsListView, Path=SelectedItem}" /> </ContextMenu> </ListView.ContextMenu> </ListView> The problem is that the

Put Java application into file manager's context menu

不想你离开。 提交于 2019-12-31 05:16:10
问题 I'm using Eclipse IDE on Ubuntu. My app offers encryption services and I want to integrate it into the client OS. My question is: Is there a way to put my app programmatically into the context menu (right-click options) of the file manager, irrespective of the file manager a person is using? I would also like to know if there is any way I could do this on Windows explorer as well. But my guess is that it involves adding values to the registry and can be easily achieved. So, is there a general

WPF UserControl Context Menu Visibility Binding

白昼怎懂夜的黑 提交于 2019-12-30 09:55:08
问题 My user control context menu visibility can't bind a dependency property. Any idea? Here is my WPF code <UserControl.ContextMenu> <ContextMenu Visibility="{Binding ElementName=wellControl, Path=IsInCompactMode, Converter={StaticResource BooleanToVisibilityConverter}}"> <MenuItem Command="local:GCommands.Edit" /> <MenuItem Command="local:GCommands.Delete" /> <MenuItem Command="local:GCommands.ExportFcsFiles" /> <MenuItem Command="local:GCommands.BatchExportStatistics" /> <Separator/> <MenuItem