menuitem

ActionBarSherlock with multiple MenuItems?

巧了我就是萌 提交于 2019-12-10 10:20:10
问题 I've been using ABS 4.0 with two MenuItems in one of my apps, but have discovered a little error: When pressing the second MenuItem, it does exactly the same as the first one... I've tried just about everything I can think of, but it isn't working. I've altered onOptionItemSelected, as I thought that was the method I need to edit. EDIT: I've been looking at @Ollie's suggestions, but neither LogCat nor Debug is showing weird things. Maybe it's in some other part of the code, or a declaration

How to select a Menu Item without closing the Menu?

心不动则不痛 提交于 2019-12-10 09:40:57
问题 By default when you select an item from a TMainMenu or TPopupMenu etc, the menu closes after it was clicked. I would like to change this behavior so that when I select on a menu item, the menu does not close but remains visible and open at the point it was last clicked, making it easier to select another menu item if desired. Of course, switching focus to another control should hide the menu like normal, but if the focus is still on the menu keep it visible. If this is possible, I would like

WPF MenuItem IsChecked Binding not working

◇◆丶佛笑我妖孽 提交于 2019-12-10 03:49:05
问题 Anyone know why the menu item binding does not work ? <ToggleButton Name="toggleButton" Checked="checkBoxPublish_Checked" > <ToggleButton.Resources> <converters:BooleanToHiddenVisibility x:Key="boolToVis"/> </ToggleButton.Resources> <Grid> <Image Height="auto" HorizontalAlignment="Left" Margin="5" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="auto" /> <Viewbox > <TextBlock Text="Blocked" Opacity="0.7" Foreground="Red" Visibility="{Binding Path=IsChecked, ElementName=toggleButton

How to add menu items separators which work as expected on OSX?

穿精又带淫゛_ 提交于 2019-12-10 03:26:47
问题 On Windows platform, with the VCL , when we want to add a separator in a menu, we add a TMenuItem with a Caption := '-' ; With FireMonkey , we add a TMenuItem with a Text := '-' ; It works as expected on Windows platform, the item with the Text='-' is displayed as a separator. But, when I run the same application on OSX , I have the minus sign visible... I haven't found any property on the TMenuItem to specify it is a separator ... I have tried with a TMainMenu and a TMenuBar ( UseOSMenu :=

Changing options menu icon in actionbar depending on an open Fragment

不羁的心 提交于 2019-12-10 01:08:39
问题 I have this item in my options menu: <item android:id="@+id/opt_mnu_action" android:icon="@android:drawable/ic_dialog_info" android:orderInCategory="1" android:showAsAction="ifRoom" android:title="New"> </item> The menu itself created in main FragmentActivity. I want to change this item's icon programmatically depending on the open Fragment and, obviously, have different actions when the user hits this button. I tried several things to do that, but nothing worked. The last thing I tried was

How can I prevent a main menu item with sub items from being clickable in Wordpress?

人盡茶涼 提交于 2019-12-09 23:43:45
问题 Here is my site: http://wake9.com/blogs/norcal-merced-wakesurfing-competition-2009/. Notice the menu item "Photos and Results". Hover over it and you will see sub menu items. I want to be able to click on the sub-menu items but the main menu item shouldn't be a page or be clickable. The only way i could get this item on the menu was to make it a page. Is there a way to just have a menu item that has sub menu items to content, but the actual menu item isn't clickable? I was thinking about

Bind ContextMenu's MenuItem visibility to ListView selection

心不动则不痛 提交于 2019-12-09 17:10:34
问题 I have a user control with a ListView containing simple items from an ObservableCollection. I would like the ContextMenu of that ListView to contain items depending on what's selected in the ListView. If no item is selected, some MenuItems should not be visible. My converter isn't even called when I open the ContextMenu. The binding seems to be wrong, I find this in the output window: System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=listView'.

Android: how to make transition animations on toolbar's menu icons?

折月煮酒 提交于 2019-12-09 13:01:45
问题 If you use the last version of WhatsApp you will notice that if you long click a textbox in a chat, then the menu icons on the toolbar will change with a nice rotating animation. How could I reproduce that effect? I know I should invalidate the menu but not how to make the animation. 回答1: Use a Toolbar . Wait for the Toolbar to have its items inflated. Find the item in question Animate the item Example: mToolbar = (Toolbar) findViewById(R.id.toolbar); mToolbar.addOnLayoutChangeListener(new

NSSharingService Sharing Submenu

久未见 提交于 2019-12-09 08:33:44
问题 How do I add the Share submenu in a Mac app? An example is Safari > File > Share. I poked at the Apple SharingServices sample code, but it does not include a working menu item. Right now I have a button that displays a picker of available sharing services when tapped: NSMutableArray *shareItems = [NSMutableArray arrayWithObject:[self.noteSynopsisView string]]; NSSharingServicePicker *sharingServicePicker = [[NSSharingServicePicker alloc] initWithItems:shareItems]; sharingServicePicker

WPF: Disappearing icons

老子叫甜甜 提交于 2019-12-09 06:03:39
问题 I have several icons which are declared in Window.Resources. They show up fine the first time they need to appear (eg: a Menu is clicked, the MenuItem icon works), but after another Menu (eg: a context menu) is shown, the original icon disappears and does not return. It's as though the last element which used the icon for the first time gets to keep it. <Window.Resources> <Image x:Key="Chart_16" Source="pack://application:,,,/Resources/images/chart_16.png" /> ... <Window.Resources> <MenuItem