contextmenu

flex 3 passing data from modules to parent application to switch views in the viewstack

丶灬走出姿态 提交于 2019-12-08 06:27:55
问题 Hello Fellow stackoverflowers, I´m stuck writing a piece of code. I have application with a viewstack witch load 5 modules. each module is loaded via the moduleLoader tag and they all have an id. Every loaded module has a context menu. the context menu has 5 menuItems. one menuItem for each view for the viewstack. The context menu is loaded via xml. this is my application file. <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"

How to create a dynamic context menu in android?

拟墨画扇 提交于 2019-12-08 05:40:16
问题 @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"); } I want my menu to say "Remove AAPL" I would get the string AAPL from my array adapter, but I am not sure how I can access my array adapters index from this method. 回答1: Example if you are using listviews with custom object: @Override public void onCreateContextMenu

Android: help create Context menu from listview

这一生的挚爱 提交于 2019-12-08 03:58:11
问题 this is the class. i want to add context menu to it on longpress but as a newbie i find i difficult. Please help. private ListView lvUsers; private ArrayList<UserBO> mListUsers; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.select); mListUsers = getUsers(); lvUsers = (ListView) findViewById(R.id.lv_user); lvUsers.setAdapter(new ListAdapter(this, R.id.lv_user, mListUsers)

Why doesn't the tray icon context menu work for my RemoteApp?

烈酒焚心 提交于 2019-12-08 03:52:22
问题 I have an application which adds an icon to the notification area (aka the "system tray") using Shell_NotifyIcon. The icon has a context menu with various important commands. When the app runs on the local system, the context menu works fine. However, when the app is run as a Terminal Services RemoteApp, right-clicking the icon does not display the context menu. The various keyboard-based methods for opening the context menu also don't work. Double-clicking the icon still behaves as expected,

How to bind a Command to a ContextMenu from within an ItemTemplate?

淺唱寂寞╮ 提交于 2019-12-08 00:01:53
问题 I want to bind a certain command to a menuItem . The said menu item is part of a ContextMenu that is defined inside an ItemTemplate . Right now, what I have compiles and runs, but the command is never called. In the past, I had used a similar pattern to hook commands to buttons defined in an ItemTemplate with success. Anyone has any idea how I could accomplish this? XAML: <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006

Android: Theme ContextMenu item selection

杀马特。学长 韩版系。学妹 提交于 2019-12-07 21:00:51
问题 How can I theme the list seletor in a ContextMenu? For ListViews I used the way described here: http://brainflush.wordpress.com/2009/03/15/understanding-android-themes-and-styles/ So I assigned the created style to my theme like this: <style name="Theme...." parent="@android:style/Theme.Light"> <item name="android:listViewStyle">@style/ListView</item> </style> 回答1: Try Override context menu colors in Android and see if it helps. It says you can't override the standard context menu selector

Get the SourceControl of my ContextMenuStrip when I use the shortcut key

感情迁移 提交于 2019-12-07 18:05:00
问题 I have single ContextMenuStrip attached to two controls ( DataGridView ). In the ToolStripMenuItem click event, I manage to get the original caller (the DataGridView ) with this code : var menu = (ToolStripDropDownItem)sender; var strip = (ContextMenuStrip)menu.Owner; var dgv = (DataGridView)strip.SourceControl; It works pretty good when I click on my ToolStripMenuItem . But when I use the sortcut key linked to the ToolStripMenuItem , the strip. SourceControl return null. Does anyone know why

Binding a TreeView with ContextMenu in Xaml

人走茶凉 提交于 2019-12-07 17:45:08
问题 I'm pretty new to Xaml and need some advise. A TreeView should be bound to a hierarchical object structure. The TreeView should have a context menu, which is specific for each object type. I've tried the following: <TreeView> <TreeView.Resources> <DataTemplate x:Key="RoomTemplate"> <TreeViewItem Header="{Binding Name}"> <TreeViewItem.ContextMenu> <ContextMenu> <MenuItem Header="Open" /> <MenuItem Header="Remove" /> </ContextMenu> </TreeViewItem.ContextMenu> </TreeViewItem> </DataTemplate> <

Custom Context Menu with Javascript?

匆匆过客 提交于 2019-12-07 17:09:45
问题 Is there a way to add custom fields to the built in browser context menu using Javascript? I know flash/actionscript can do this, how are they doing it? Example: right click on http://josephjewell.com and see the custom context menu. Is this possible with pure javascript or do you have to use flash? Note, I'm looking for adding to the built in browser context menu, not using custom javascript popups to mimic them. 回答1: Is this possible with pure javascript No. do you have to use flash? Well,

wpf context menu left-click

妖精的绣舞 提交于 2019-12-07 16:27:26
Is it possible to attach context menu to a wpf control and have it opened on left-click (as opposed to more customary right-click)? I want to achieve that using xaml only (this should be a part of my control's view template). Here is a way to show context menu on left-click: Create a new left button handler on the Border element: <Border x:Name="Win" Width="40" Height="40" Background="Purple" MouseLeftButtonUp="UIElement_OnMouseLeftButtonUp"> and then add this: private void UIElement_OnMouseLeftButtonUp(object sender, MouseButtonEventArgs e) { e.Handled = true; var mouseDownEvent = new