menuitem

How do I customize menu item's background color?

▼魔方 西西 提交于 2019-12-12 20:18:08
问题 I'm trying to customize Toolbar 's popup menu. Now I can not set background color of menu item. My styles.xml looks like this: <resources> <!-- Base application theme. --> <style name="AppTheme.NoActionBar" parent="@style/Theme.AppCompat.Light.DarkActionBar"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> <item name="android:actionBarStyle">@style/AppTheme.ActionBar</item> <item name="android:actionMenuTextColor">@color/actionbar_text_color</item> <item name=

How to force JPopupMenu to show title even if Look and Feel UI dictates otherwise?

时光总嘲笑我的痴心妄想 提交于 2019-12-12 19:24:04
问题 Javadoc for JPopupMenu constructor says the following: JPopupMenu public JPopupMenu(String label) Constructs a JPopupMenu with the specified title. Parameters: label - the string that a UI **may** use to display as a title for the popup menu. Key word being "may". Evidently in the default UI, such titles are ignored when creating a popup menu. I very much want such titles in some of my popup menus to be used regardless of whether or not the L&F thinks I should. I can't find the hook to make

JavaFX CSS - Font color in MenuItem

天涯浪子 提交于 2019-12-12 16:43:14
问题 I am styling my MenuBar in JavaFX and I have been trying to change the font-Color of the text in the MenuItem but no success. this is my CSS code. How could I do it? .menu-bar { -fx-background-color: darkslategray; -fx-opacity: 0.5; } .menu-bar .menu-button:hover, .menu-bar .menu-button:focused, .menu-bar .menu-button:showing { -fx-background: -fx-accent; -fx-background-color: darkslategray; -fx-opacity: 0.5; -fx-text-fill: -fx-selection-bar-text; } .menu-item { -fx-background-color:

how to disable SpreadsheetApp.addMenu item

末鹿安然 提交于 2019-12-12 10:56:57
问题 The SpreadsheetApp.AddMenu(name, array of entries) produces a new menu in the top bar of the spreadsheet. Alternatively, there is the getUI.createMenu that results in an array of items. Both work fine, not sure which is better. Is it possible to disable and enable some of the menu entries depending on what the active sheet is? Is there a way to tell when a particular sheet becomes active? If not, I can work with the onChange or onEdit events since the menu item I want disabled needs to be

FF extension: a popup with dynamic menuitems, with each menu item having another popup

帅比萌擦擦* 提交于 2019-12-12 10:24:34
问题 I am building an extension that has a popup whose elements are constructed by a function call everytime the mouse hovers over the popup option. I am able to achieve this. Now I need to have a popup for each of the menu item (inside the original popup) which is not dynamic though. I have this code, but it does not work: var myMenuPopup = document.getElementById("file-popup4"); for (var m=0; m<localpubliclist.length; m++) { var newItem = document.createElement("menupopup"); newItem.setAttribute

Enable/disable menu item in Eclipse plugin

江枫思渺然 提交于 2019-12-12 08:52:50
问题 I've made a pop-up menu with one menu item, I want to enable it only when I do a right click on a tree item of a certain class type otherwise disable it. How can I achieve this? 回答1: You can add a handler that uses activeWhen and associate it with that menu's command id. Here is a handler that makes a command active only when the current selection is not empty, and the selection is an item that can be adapted to an object of type Widget : <extension point="org.eclipse.ui.handlers"> <handler

Dynamically adding ToolStripMenuItems to a MenuStrip (C#/ Winforms)

折月煮酒 提交于 2019-12-12 08:18:45
问题 I have my solution implemented (basic solution) and I'm happy. Problem is when I add new items to a ToolStripItemCollection using the 'Add' method, I get a few overloads ... the meaningful one being a string parameter, an image parameter and an EventHandler parameter. Because my drop down list is going to be serving as a dynamic history at RunTime, means it going to be empty at compile time. This means I can't add an event handler through the standard route of using the designer surface (On

Closing Winform MenuStrip when mouse leaves the container

拜拜、爱过 提交于 2019-12-12 03:45:21
问题 I´m have been dealing with this issue all day. I have a menustrip with several menu items. Each item, also have many items. Now, if I click the parent menu item, a container(similar to contextmenu) stays opened until I click somewhere else. In the image example, "Clientes" will be the parent item, and there its the "container" with their child menu items. What I wanted to do, is to close that "container" when the mouse leaves the parent item or the container area. I dont want to have to click

How to set focus on a MenuItem in material-ui

强颜欢笑 提交于 2019-12-12 03:42:38
问题 I am trying to programmatically set focus on (activate) one of the MenuItem(s) inside the Menu component in material-ui. I can manually do it by tabbing to it but I need to do it programmatically in response to a key down event. <Menu disableAutoFocus={true}> <MenuItem .../> <MenuItem .../> ... </Menu> 回答1: Do you mean by select the menuItem programmatically? If so, you can use the concept of 'controlled component'. Here is the example, If this.state.selectedItem = 1, the item 'Maps' will be

Bind/naviagte menu items in web forms (ASP.net)

强颜欢笑 提交于 2019-12-12 03:13:56
问题 I am new to ASP.net web forms. Please help me for following issue. Dragged menu control in the design. Edited menu items with its sub items. I have a grid view with the data bound to the database. When I select the sub menu item the gridview with the data should be shown below the menu. How to show he gridview when I select a menu item I tried to bind the grid view id but it doesn't work. <asp:Menu ID="mini" runat="server" Orientation="Horizontal"> <Items> <asp:MenuItem Text="Item"> <asp