contextmenu

WPF Contextmenu with gridcontrol

One Contextmenu in my application has Grid controls ( with buttons ) as menuitems. <RichTextBox.ContextMenu> <ContextMenu Width="280"> <Grid Width="240" Height="65"> [...] </Grid> </Contextmenu> </RichTextBox.ContextMenu> The Problem is when I first open the ContextMenu and move the mouse over it, ...

Get the standard context menu for System.Windows.Forms.RichTextBox

How can I get the standard context menu in a RichTextBox, like the one in TextBox (Copy, Paste, IME etc.)? I'd go with a P/Invoke solution if nothing is available out of the box. Or do I really have to follow those strange advices to create a custom menu to get a standard menu (sigh)? ...

I have a context menu which is being shared by 6 different labels, how can I tell which label is using the current instance of the context menu?

Here is the xaml for the contextMenu: <Window.Resources> <ContextMenu x:Key="IBContextMenu" x:Shared="true" Name="IBContextMenu1"> <MenuItem Header="Edit" Click="ibEdit_Click" AllowDrop="False" /> <MenuItem Header="Clear" Click="ibClear_Click"/> </ContextMenu> </Window.Resources> Both the edit and clear ite...

WPF contextmenu and ListView

Ok, hopefully this is simple but for some reason I can't find a straight answer and I'm not familiar enough with WPF yet to know how to do it. I have a listview, it gets bound to an observable collection of objects to display. I want to have a context menu with a bunch of options. The options in the context menu are relative to the part...

How to call application menu programmatically ?

I have non-rectangular transparent window with custom style. <Window x:Class="TestWindow" x:Name="Window" Width="350" Height="450" AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="CenterScreen" FontSize="14 px" FontFamily="Fonts/#Tahoma" Background="Transparent"> I have a grid for title and system buttons...

Using Windows Explorer context menus within WPF

Hello All, Is there a way to gain access to the Windows Explorer shell context menus for files & folders without using a complete Explorer drop-in control? The gist of my plight is this: I have a Viewport3D that displays a handful of raw files & folders. Basically, it's like every other 3d explorer replacement you've ever seen :) W...

Check Clipboard for Copied texts.

I want to add an Cut/Copy/Paste ContextMenuStrip in a RichTextBox, but the problem is, I want to enable or disable the Paste button with respect to the current condition of the windows clipboard.. I mean, if any text is copied already, then that button should be Enabled, otherwise disabled. Any idea how I can accomplish that? ...

How to reuse a piece of XAML in a ContextMenu?

Say that I have the following piece of XAML: <Window> <StackPanel Orientation="Horizontal"> <Label>Phone:</Label> <TextBlock Text={Binding PhoneNumber}"/> </StackPanel> </Window> I would like to reuse this as the content of a ContextMenu. What is the best way to do that? ...

Using MVVM, how can a ContextMenu ViewModel find the ViewModel that opened the ContextMenu?

I'm using MVVM to bind views to objects in a Tree. I have a base class that implements the items in my tree, and that base class has a ContextMenu property: public IEnumerable<IMenuItem> ContextMenu { get { return m_ContextMenu; } protected set { if (m_ContextMenu ...

Can I apply a ContextMenu to a ContextMenuViewModel using a DataTemplate?

I have a ViewModel (AbstractContextMenu) that represents my context menu (IContextMenu), and I bind a real ContextMenu to it with a DataTemplate: <DataTemplate DataType="{x:Type local:AbstractContextMenu}"> <ContextMenu x:Name="contextMenu" ItemsSource="{Binding Path=(local:IContextMenu.Items)}" IsEnabled="{Bind...

How Can I Adjust The Size Of Context Menu in Android?

How Can I Adjust The Size Of Context Menu in Android? ...

Windows Explorer Context menu opening already running Delphi app

Hi, If I right click on several files and choose windows context menu, how to send the selected name of files to my program. My program has already running and I dont want my program to be executed again because my program use mutex and uac. I am using delphi, if you have clues, reference or sample code, really appreciate. ...

Detecting which selected item (in a ListView) spawned the ContextMenu (Android)

I have a ListView that will allow the user to long-press an item to get a context menu. The problem I'm having is in determining which ListItem they long-pressed. I've tried doing this: myListView.setOnCreateContextMenuListener(new OnCreateContextMenuListener() { @Override public void onCreateContextMenu(ContextMenu menu, final View v...

Shortcut keys on ContextMenuStrip

Hello i have added ContextManuStrip to TreeList. ContextManuStrip has some ToolStripMenuItems, i have implemented their "Click" events and everything works fine. Now in designer i added "ShortcutKeys". Now, how to do so: when i use shortcut key - program will call my "Click" event..? ...

jquery apply context menu on all children

I am using a jquery context menu plugin (http://www.trendskitchens.co.nz/jquery/contextmenu/) which works fine but I want to work for all children of a selector currently I have the below but it only applies to divs with class area and I need it to apply on div's with class area and all its children. $('#container-area .area').contextM...

Information from listview row for Android context menu

Hi, I have created an application for Android that has an activity that has a ListView which lists all current users (each row is just an image of their profile along with some text with their current status and username). I have added a contextmenu, so that a long-click brings up several options such as "view profile", "send message",...

wxWidgets and context menus

I'm trying to add context menus into a (large) custom control in my application but have run into a number of issues with when to create them. There are 3 cases when a context menu needs to be created (unless I forgot one...) on a right mouse click, when the menu key is pressed and for Shift + F10. In all cases the menu is created and d...

Double right click to Show a PopUpMenu with A TListView !!

Hi, I have a TListView and TPopupMenu, and I want to show a context menu when I right click on a TListItem. I tried the "AutoPopup" by assigning the component, but on a right click the PopupMenu is shown only and the wanted element is not selected. So i tried to use the "OnMouseDown", but we need to click and click again to show the men...

QT How to remove the action menu item

Hi, when i add the widget to the main window, by default the action menu item will be present, how to remove that? menuBar()->setVisible(false); verAction = new QAction(tr("&Version"),this); menuBar()->addAction(verAction); connect(verAction, SIGNAL(triggered()),this, SLOT(displayVersion())); displayAction = new QAction(tr("&Display"...

Empty Win32 Popup Menu

I'm trying to create a dynamic popup menu within my application, the generation code I use is something like that : HMENU menu; POINT pt; menu = CreatePopupMenu(); SetForegroundWindow( receivingWindow ); GetCursorPos( &pt ); int i = 19; AppendMenu( menu, MF_STRING, i++, _TEXT("meh meh") ); AppendMen...