contextmenu

Android: Context menu on single click

ぃ、小莉子 提交于 2019-12-18 11:44:31
问题 I have an Intent that extends a ListActivity. In my onCreate method after having populated the list adapter I use registerForContextMenu(getListView()); to register for a context menu. Now it is working and the context menu has its original function which is; once I click and hold down on an item the context menu opens. Can I open the context menu on a single click (without having to hold down on the list)? All help is appreciated. 回答1: call activity.openContextMenu(l) onitem click event to

WPF - how to hide menu item if command's CanExecute is false?

独自空忆成欢 提交于 2019-12-18 10:58:24
问题 By default menu items become disabled when its command cannot be executed (CanExecute = false). What is the easiest way to make the menu item visible/collapsed based on the CanExecute method? 回答1: You can simply bind Visibility to IsEnabled (set to false on CanExecute == false). You still would need an IValueConverter to convert the bool to visible/collapsed. public class BooleanToCollapsedVisibilityConverter : IValueConverter { #region IValueConverter Members public object Convert(object

Right-click context menu for Java JTree?

≡放荡痞女 提交于 2019-12-18 10:51:17
问题 I'm trying to implement pop-up menus in Java JTree. I've sub-classed DefaultTreeCellRenderer (to change node appearance) and DefaultTreeCellEditor (to create Components to attach event listeners to, since apparently the Components that DefaultTreeCellRenderer.getTreeCellRendererComponent() returns can't do it?). I don't really want to "edit" the nodes, just be able to pop-up a menu when a node gets right-clicked, but this is the only way I can think of doing it right now... Below is the code

Windows shell add item to context menu when click on blank part of folder

三世轮回 提交于 2019-12-18 10:35:25
问题 Sorry if this has been asked before, I've been looking around and it's hard to find what I want. I know how to add a context menu item to a folder like so: [HKEY_CLASSES_ROOT\Folder\shell\console2] @="Open Console2 Here" [HKEY_CLASSES_ROOT\Folder\shell\console2\command] @="C:\\Program Files\\Console\\console.exe -d \"\"%1\"\"" but, that only works for right clicking on a folder. I want it so that you can be inside the folder, and click a blank part of that folder and get the context menu item

pass contextmenu parent as CommandParameter

戏子无情 提交于 2019-12-18 09:45:56
问题 i have a HierarchicalDataTemplate for a TreeViewItem, in the template i have a contextmenu and i want to pass as CommandParameter the ContextMenu parent - i.e the TreeViewItem owner that was right clicked at the moment, is there a way to do that? here is my template: <HierarchicalDataTemplate x:Key="ServerTemplate" DataType="{x:Type models:Server}" ItemsSource="{Binding Channels}" ItemTemplate="{StaticResource ChannelTemplate}"> <StackPanel Tag="{Binding DataContext,RelativeSource=

Custom values to Context Menu Items in JQgrid

狂风中的少年 提交于 2019-12-18 09:35:17
问题 I am using this link from Oleg and Demo to create context menu. Is there a way to pass some dynamic values to each row apart from rowId. May be one way is to set hidden values for each row and get those hidden column values but not sure how to implement this functionality. Thanks for any help or suggestions.. loadComplete: function(data) { // Fix the Grid Width... fixGridWidth($("#grid")); // Context Menu $("tr.jqgrow", this).contextMenu('contextMenu', { bindings: { 'abc1': function(trigger)

Android - EditTexts in Gallery show strange behaviour when being (long)-clicked

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-18 09:26:55
问题 my program is based on Google's Hello Gallery example: http://developer.android.com/guide/tutorials/views/hello-gallery.html Instead of using images, I create a bunch of EditText s in the constructor. My question is now: When I long click on an EditText, I want its Context Menu (with "select all", "copy" and so on) to be shown. I've tried setting an OnItemLongClickListener which calls the selected view via myGallery.getAdapter().getView(position, ...).showContextMenu() , but that runs into a

How can I set up a contextMenu for my jqGrid?

╄→尐↘猪︶ㄣ 提交于 2019-12-18 08:59:29
问题 I have a jqGrid for internal use on our site that lists all our users. On each user/row, I would like to be able to apply various options (depending on the data in that row). Instead of adding navbuttons to the pager, it would make more sense to have a context menu that appears on right-click of a row. We currently have this jQuery contextMenu plugin imported on our site, so it would be preferable to somehow integrate that into my jqGrid. My jqGrid scaled down to basics looks something like

Showing windows (file/directory) context menu in c# winforms application

陌路散爱 提交于 2019-12-18 05:56:38
问题 I'm trying to display standard file/directory context menu in WinForms application - I'd like to enable the user to do things with files in my application as he could in Explorer. There should be two options popup the context menu with some system call read everything from the system context menu and insert it into my context menu Could you please point me in the right direction? Thanks 回答1: I have written a .NET library to allow this. You can find it here: http://gong-shell.sourceforge.net/

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

偶尔善良 提交于 2019-12-17 22:19:52
问题 This question already has answers here : Closed 8 years ago . 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=