Customize the menu css
I'm trying to change the background of a Menu inside a menu bar. I was able to change the background of the MenuItem, but there's this gap at the top and at the bottom of the menu that is always gray, and I can't seem to find a way to change this.This is my code
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.stage.Stage;
public class CustomizeMenu extends Application {
public static void main(String[] args) { launch(args); }
@Override public void start(Stage stage) {
MenuBar mb = new MenuBar();
Menu menuFile = new Menu("File");
Menu menuView = new Menu("View");
menuView.getItems().addAll(new CheckMenuItem("All"), new CheckMenuItem("None"));
menuFile.getItems().addAll(new MenuItem("Open"), menuView, new MenuItem("Close"));
mb.getMenus().add(menuFile);
Group g = new Group(mb);
Scene scene = new Scene(g, 400, 300);
scene.getStylesheets().add(CustomizeMenu.class.getResource("custom-menu.css").toExternalForm());
stage.setScene(scene);
stage.show();
}
}
It's my css.menu {
-fx-background-color: blue;
-fx-text-fill: white;
}
.menu-item{
-fx-background-color: blue;
}
.menu-item .label {
-fx-text-fill: white;
}
.menu-item:focused .label {
-fx-text-fill: white;
}
Any help would be appreciated, thanks.
Try
ContextMenuContent {
-fx-background-color: yellow;
}
There should be a better/more easy way via css to this style.
Tags: Java
Similar Questions
-
Ubuntu: 14.04
Firefox: 35.0.1Main menu: file, Edit, View, history...
Problem: folders in main menu popup menu bookmarks e.g. are not clearly visible. I would like to change the background colors or view records, but I couldn't find a way to do this.
So, to try: using themes, elegant add, userChrome.css in the profile. All these options for example change the color of the tab or page in the menu. However, none of them I could use to change the main menu.
Tried to attach an image, but it will not download.
If you have the menu bar that is provided by your Ubuntu operating system as part of the unit then it is not possible to do unless you disable this integration and restore the clean Firefox menu bar.
-
In the old version you could hide the or delete to subscribe to this page from the bookmarks bar option menu option and the same for the unsorted Lily book option.
I would also like to remove some spaces that surround these options in the menu.I want to talk about the menu bar with the bookmarks menu item.
All of these options in the bookmarks menu makes for lots of unnecessary scrolling for the bookmarks menu in any direction (upwards or downwards). I think it's very annoying that there is NO option to hide these elements either to just outside and to remove it!
The toolbar that I speak has this list on this.
File Edition display history bookmarks tools help
In this menu bar in the drop-down menu bookmarks menu is now where I want to get rid where hide the items mentioned above, that allows you to be able to do.
If you want to hide Unsorted Bookmarks in the bookmarks Menu (However he always appears in the bookmarks library), follow these steps:
-> Create a userChrome.css file in a folder named chrome in your Firefox profile folder
-> Close Firefox
-> Now enter (or copy / paste) the following code into the userChrome.css file.
@namespace url ("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); / * This line is needed only once * /.
#appmenu_bookmarksPopup menuseparator[builder="end"], #appmenu_unsortedBookmarks, #bookmarksMenuPopup menuseparator[builder="end"], #menu_unsortedBookmarks, #BMB_bookmarksPopup menuseparator[builder="end"], #BMB_unsortedBookmarks {display:none!important;}
-
Can I customize the menu bar to add common filters and image adjustments
I often use several filters like sharpen and deinterlace or multiple image adjustments. Actions do not help because the order is not always the same. It would be nice to add those that I use the most on the menu. If Photoshop list the last 3 filters instead of one, that would solve the problem as well.
Does anyone know how to add a button to the menu bar?
Thank you
N ° there is no way to add items to the bar of the application. You can create customized using Configurator panels that:
-
If I right-click (Windows) on a JPG file in the content tab of Bridge CS6, I see one that the Open with menu contains "Firefox" 37.0.
I would like to add a choice in this menu to open an image (or two) with stereo Photo Maker (a program contained in a single .exe file).
If Firefox is able to customize bridge, why don't not me?
Than you.
Preferences (Ctrl k) > file types Associations
Select each type of file in turn, and click on the arrow down. If your favorite application for this file type is not listed, click Browse and find.
-
Can't do things...
Eeekkkk! How can I submit it? The keyboard won't go away!
Usually, I must dismiss the keyboard using the icon that replaces the back icon (it looks like a very flat v). Probably, it depends on your device.
What you want to customize? The Android version has all the functionality of the desktop version...
-
Customize the menu classic start
Currently, it is what is in my Start menu classic;
Windows Update
Set Program Access
----------------------------------
Programs
Documents
Parameters
Search
Help
Run
-----------------------------------
The control panel is buried under settings and the printer, etc. Before I had to rebuild my system and re - install XP SP3, control panel used to be above the line of the top with the Windows Update link. How can I put it up here?
Open the Control Panel, enter the "icon" in the address bar with the left mouse button and drag the Start button, pause, after boot opens, place the shortcut to the desired location.
-
Smartphones blackBerry how to customize the menu of the home page?
I can see how to move the icons in the main menu, but how can I move them from the main menu on the home page?
No problem!
Yes the Blackberries are compatible radio, but no FM radio, it's on the internet or satellite radio. At least for my 8130 Pearl. In my view, there are other blackberries that have FM radio. Don't quote me on that well. So I Sprint: in Applications, click on Sprint TV > Sprint Radio (at least that's how I access). And depending on the type of data/blackberry plan you have, some of the stations are free and others you need to subscribe to.
-
Customize the display of the class Menu
I was wondering if there is a way in DW4 to customize the class drop-down list menu so that it doesn't have a sample of all the styles/class, as I have some pretty wild that really clutter the menu.
In the end, it would be good if I could have just a dropdown menu with the text displayed special unformatted and gross.
Thoughts? I went through the options of DW, but I'll be darn if I can find an option for this hidden anywhere...
JohnJohn,
Right click and look at the CSS Styles submenu.
HTH,
Randy> I was wondering if there is a way in DW4 to customize the menu of class drop-down list so
> that there not a sample of all the styles/class as I have enough
> savages who really cluttering up the menu.
>
> At the end of the day, it would be good if I could just have a dropdown menu with the plain
> text and no displayed particular presentation. -
Extension installed for Evernote Web Clipper (EWC). Go to customize the menu bar. The extension is not displayed to put on the menu bar. Other extensions are displayed. Remove the extension from the DRC and reinstall it. Still can not display it. 8.1 Windows running in a 64-bit environment.
Now, it's a problem with two buttons extension disappeared? Probably an extension 3rd screwing things cause an incompatibility. I call it "don't play well in a group" - taken from some of my report cards in elementary school in the 1950s.
See problems using Firefox Safe Mode.
Or you can start disabling extensions until you find which one is causing these two "buttons" to disappear. Or maybe one of us could recognize the culprit to provide a list of your installed extensions.
Help > troubleshooting information and use "Copy to clipboard" and then paste this info to Pastebin.
http://pastebin.Mozilla.org/
Give us the URL of the ID after having done 'stick '. -
Customize the tab missing in the Properties menu.
As a general rule, when you right click on a folder, there will be a tab customize, so a user like me can add an image in the folder.
I have studied this problem. I tried to move to folders origins by clicking on "position to open the folder" then clicking on properties, always not to customize the menu. A referred page edited the registry keys, I tried hesitantlyh, but I have no tab customize under the folder properties.
Ideas?
I found the answer to my problem. I had to manually reset the tab in regedit.
Reach:HKEY_CLASSES_ROOT \ directory------shellex------PropertySheetHandlersThere is a key called:{ef43ecfe-2ab9-4632-bf21-58909dd177f0}Mine has a space in front of it, the space was making it so the tab would not come.If you do not have the add key and the tab will come, otherwise, make sure the key is exactly as shown.Source: -
When I click on the menu button, why I can't see the historical option?
According to the help instructions, in order to remove all or part of the history of my search, I'm supposed to click on the menu button and then select the option of history. However, when I click on the menu button, the story is not listed as one of the options.
Hi, the button can be in 'other tools and features' in the section Customize the menu. If so, you can drag it to a location of your choice. If it is not visible, try clicking on Restore Defaults - more information - controls customize Firefox, buttons, and toolbars.
You also bring up history by pressing Ctrl + H. Or you can bring up the menu bar (History tab) temporarily by pressing Alt, or if you want to stay there all the time, then right-click in the tab bar (but not on a tab) and a tick/check bar menu.
If your question is resolved by this or another answer, please take a minute to let us know. Thank you.
-
Question about the menu filters of Photoshop, and how he orders the elements
I'm in my Plug-Ins in Photoshop CS5 folder, and everything is in order, it. Alien Skin has its own folder, with subfolders for 4 different plugins.
However, inside Photoshop, under the menu filters, plugins aren't as orderly. On the one hand, the higher level is completely ignored, and all 4 plug-ins are immediately visible (not grouped under a "Alien Skin" level). In addition, one of the plugins is not grouped with the other three. It is at the end, AFTER the option "Browse filters online", only.
Is it possible to customize the menu filters so things are ranked higher?No, there is no way to customize the order, and the records have nothing to do with it.
The plugin manufacturer decides where their items are displayed in the menus.
-
How to customize the CSS for the right-click menu?
I have the Chromedit extension installed, and I want to customize the design of my context menu to look "Flat" as menu right-click chrome. It would also be nice to make all the other menus, such as the Firefox button to be flat. What is the item in the context menu of firefox CSS? Specifically, I would like to know the names of the CSS elements for the
- entire menu - any menu element
In fact, incidentally, is there a systematic way of knowing the name of element CSS for a browser component? Any extension to this?
Edit: I chose the solution of cor - el on the advice of jscher2000, however, for the future visitors convinience, here is the link to the complete solution of jscher2000:
Have you tried that?
#context-openlinkprivate { background-color: #4281F4 !important; -moz-appearance: none !important; }
-
Customize the style of the menu bar with CSS
Someone been able to successfully implement a CSS attribute of background color for the menu items in a menu bar? I'm affecting the attribute defined as external style sheet menu bar styleName:
{.mainMenuBar}
color: #E6EBEC;
fill-alphas: 1.0, 1.0;
fill-colors: #000000, #000000;
background-color: #FFFFFF;
}
The CSS is correctly applied to the top-level menu bar, but submenu items seem to ignore CSS completely. Is there a specific subclass of CSS I can set to override the default menu item style? I'm pretty frustrated at this stage because of the lack of documentation / resources that I can find online about this and any help would be greatly appreciated."burroinquieto" wrote in message
News:gd37mi$15I$1@forums. Macromedia.com...
> Anyone could successfully apply a CSS attribute
> background color
> to the menu items in a menu bar? I'll put the styleName
> attribute defined as external style sheet menu bar:
>
> .mainMenuBar {}
> color: #E6EBEC;
> fill-alphas: 1.0, 1.0;
> fill-colors: #000000, #000000;
> background-color: #FFFFFF;
> }
>
> CSS is correctly applied to the top-level menu bar but the submenu
> Articles
> seem to ignore CSS completely. Is there a specific subclass of the CSS I have
> can
> set to override the default menu item style? I am quite frustrated at
> This
> point due to lack of documentation / resources that I can find online
> regarding this and any help would be greatly appreciated.Try menuStyleName instead of styleName.
HTH;
Amy
Maybe you are looking for
-
How to change the motherboard on my Satellite L655D password?
I need to change the password on my laptop Toshiba Satellite L655d motherboard, but I don't know where I can.I'll be very grateful if someone can help me. Concerning Full Saravia
-
TOSHIBA StorE 1524E-1HK0 - does not work after moving
I just moved to another apartment and installed all my computer stuff. Unfortenaly my external hard drive won't give any connection to the PC. Also not to another PC. The light is red and blue turning. All cables are connected correct. To turn off th
-
Pavilion 17: Font size Message response
How to set the default font of a response message size? When I get a the size of the police response arises from the greater value. I want to come up to 10 or 12, not 72. [Personal information]
-
When I close the lid or let it expire and go to sleep he does not wake up when the cover. It doesn't happen every time, but it happens about 8 links on 10. You can tell it's still on, but the screen remains black. I searched and didn't find any resol
-
Want to know how my computers can I put my XP - Pro on legally.
I want to install t on my Macbook Pro using Parallels or Vmware