contextmenu

Vaadin using multiple context menus

社会主义新天地 提交于 2019-12-11 13:28:30
问题 Im trying to create a Table with Vaadin where you have different options in the context menu depending on if you have selected a single row or multiple rows. It took me a while to do this but now i have a working solution. The problem is that is feel that its not good coding practice and I would gladly take any advice in how to perhaps split my "function" into smaller classes or functions. Could I perhaps create a standalone Action class?. Feel free to comment and advice and please do note

jQuery Make left invoke Right Click Context Menu

陌路散爱 提交于 2019-12-11 13:15:00
问题 I am using some functionality I found over here: http://www.trendskitchens.co.nz/jquery/contextmenu/ It gets me started making a nice Context Menu. My purpose was to get this context menu to "Pop" on right OR left click. But I might not ALWAYS want to bind the left click, so I need to be able to always do right click, and when I want, make the left click work too with a bit of code. First, to test you will need jQuery for the demo, I am using 1.8.2 Here is the source of the plugin: /* *

WP7 Finding a ContextMenu's owner

≡放荡痞女 提交于 2019-12-11 13:05:35
问题 I am dynamically populating the contents of a StackPanel in my application by reading an XML file. Each child of the StackPanel is itself another StackPanel which contains different UIElement objects. The reason for the nested StackPanel design is because I want to associate one of 3 different ContextMenu s with of these child StackPanel s. So the structure looks like this: ---- StackPanel parent | ---- StackPanel child | | | ---- TextBlock | ---- StackPanel child | | | ---- TextBox | ----

XAML ContextMenu gets bound to wrong row in a DataGrid

我们两清 提交于 2019-12-11 12:33:01
问题 I have a XAML based ContextMenu bound to the rows in a datagrid. It works just fine - until the grid is scrolled! This is the context menu for one of the controls in the visual tree or a DataGrid row. <data:DataGridTemplateColumn Header="Customer Details" Width="*"> <data:DataGridTemplateColumn.CellTemplate> <DataTemplate> <Grid Background="Transparent"> <!-- allows click in entire cell --> <controlsInputToolkit:ContextMenuService.ContextMenu> <controlsInputToolkit:ContextMenu>

Jquery not applying on dynamic elements created in context menu

帅比萌擦擦* 提交于 2019-12-11 12:19:34
问题 I have a script containing $('a').on('click', function () {alert($(this).attr('class')); }); In my contextmenu function, I create a list with links $(function () { $('a').on('contextmenu', function (event) { $("<ul id='menu'></ul>") .append('<li><a href="#" class="test">Test 1</a></li>') .append('<li><a href="">Test 2</a></li>') .appendTo("body") .css({ top: event.pageY + "px", left: event.pageX + "px" }); return false; }); }); However, the first piece of code (the on click event) does not

avalondock override contextmenu - cannot find the type ContextMenuElement

淺唱寂寞╮ 提交于 2019-12-11 11:58:13
问题 This is a follow up question to User control in avalon dock and separate window - I've got the window opening nicely which I thought would be the hard part; but i'm having difficulty in changing the contextmenu. I'm new to WPF and avalondock and it's probably something simple but i'm missing it. Previous question pointed me to http://avalondock.codeplex.com/SourceControl/changeset/view/96370#1749982 as an example. I was getting a "ContextMenuElement not found" error so went for something

ContextMenu on TreeView-Element in MVVM-style

帅比萌擦擦* 提交于 2019-12-11 11:08:00
问题 I have the "simple" task to have a ContextMenu on a TreeView(Element) that is done in MVVM-way. When searching the web I found some solutions that I could bring to work with buttons etc. but not with the TreeView. I think the problem is with setting the ItemsSource-Property of TreeView that gives every single item an own DataContext. Here's my little Test-App where you can see the principle working for button but not for the TreeView-Elements: MainWindow.xaml: <Window x:Class="ContextMenu

Bring up ContextMenu when IsMouseOver on a Button using only XAML

佐手、 提交于 2019-12-11 11:02:04
问题 I am trying to use XAML (only, no codebehind) to bring up the ContextMenu of a button. I have this my button here <Button x:Name="btn" Style="{StaticResource mybutton}" > <Button.ContextMenu> <ContextMenu> <TextBlock Text="Information"/> </ContextMenu> </Button.ContextMenu> </Button> The Style for the button here <Style TargetType="{x:Type Button}" x:Key="mybutton"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <ControlTemplate.Triggers> <Trigger

highlighting selected item in custom list view using context menu?

▼魔方 西西 提交于 2019-12-11 10:18:16
问题 I've been trying to set my background colour on this list view and with following multiple tutorials it just doesn't come up, yet no errors are shown. What I've got is an xml file called colours in the values folder: <resources> <drawable name="red_colour">#6D0E0E</drawable> </resources> Which links to an xml in the drawable folder: <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:state_activated="true" android:drawable="

How to add a context menu to a `gframe`?

时光毁灭记忆、已成空白 提交于 2019-12-11 10:03:27
问题 How can I add a context menu to a gframe in gWidgets2 ? I tried the following construct, but it seems that I cannot attach a addPopupMenu to a gframe : require(gWidgets2) w <- gwindow("gformlayout", visible=T) f <- gframe("frame", horizontal=FALSE, container=w) l <- glabel("Lorem ipsum dolor sit amet, \nconsectetur adipiscing elit.", container=f) b <- gbutton("change name", container=f, handler=function(h,...) { names(f) <- "new name" }) lst <- list(gaction('world', handler=function(h,...)