Changing the color of the text in a Menu control with CSS
I want to change the text color of the Menu control in JavaFX. When I create a MenuBar in Scene Builder - it comes with 3 Menu controls by default ("*File*", "*Options*", "*Help*"). I have tried assigning a separate CSS id for each Menu control and using various combinations of properties to influence the text color, but can't seem to get it right whatsoever. What I want to achieve is, i.e., display *"File*" in black, instead of default white.
FXML here:
<?import java.lang.*?>
<?import java.net.*?>
<?import java.util.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.paint.*?>
<AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml">
<children>
<MenuBar id="modBar" layoutX="176.0" layoutY="122.0" styleClass="modBar">
<menus>
<Menu id="modItem" mnemonicParsing="false" styleClass="modItem" text="File" />
</menus>
<stylesheets>
<URL value="test.css" />
</stylesheets>
</MenuBar>
</children>
</AnchorPane>CSS here:
.modBar
-fx-background-color: white;
.modItem
-fx-color: black;
}I have also tried extracting the caspian CSS and playing with various properties related to *.menu* and *.menu-bar*, but still can't see the one responsible for the color of the text in menu controls?
Any help would be greatly appreciated.
I think I have found the answer (just sad that it took me half a day):
.menu .label
-fx-text-fill: black;
}
Similar Messages
-
Is it possible to change the color of the text in one specific field?
If I want to make someone's mobile number show up as the primary contact, is it possible to make the text for that number a different color or make it bold? I can't seem to find a way to do it.
Thanks.Make a Shape > Inspector > Graphic > Tinted Image Fill > Scale to fit > browse to image > click on the color patch to change the color to what you want
or
Drag in an image > overlay it with a Shape > select the color for the shape and change its Opacity
Shapes may have Gradient and Advanced Gradient (multiple colors) fills both linear and radial. Both are in the Graphic Inspector as is Opacity.
Peter -
Hello,
Here is the problematic:
1° How can i change the color of the text on a button in Roll Over or Click state (Cs5.5)
- I've many button in a doc im creating
- the color of the buttons is white with black stoke & black text
- in roll over state i want them to inverse the color coding (the text white & bottom black)
- currently the text becomes invisible as black on black cant be seen (ive stroked it white but that looks ugly)
- i would just like to know if there is a function made for this?
My other questions:
2° Ive a presentation on which Ive created buttons which tigger pop-up animations
- i have 5 buttons which trigger animations
- the viewer can chose to Click on any of the buttons randomly
- the problem is once the animation is open how can it be close... either:
a) by it self after "40" seconds
b) when ther viewer clicks another button
3° Ive created buttons linking pages..
- "go to page xxx"
- when i do a preview and click on the buttons the links dont take me to the right pages
- is that normal? (maybe in preview its suppose to be like that)
4° I would like to intergrate YouTube videos in the presentation so they play inside the docment.. when i tried.. it said the 'link isnt a flash video'
- what should i do?
5° Once i export it into Swf. how how can i visualize it? or put it online?
Thank you for your time.stlbbl4u wrote:
Hello,
Here is the problematic:
1° How can i change the color of the text on a button in Roll Over or Click state (Cs5.5)
- I've many button in a doc im creating
- the color of the buttons is white with black stoke & black text
- in roll over state i want them to inverse the color coding (the text white & bottom black)
- currently the text becomes invisible as black on black cant be seen (ive stroked it white but that looks ugly)
- i would just like to know if there is a function made for this?
You should setup Object Styles - these can also include Paragarph Styles that can be triggered when the Style is selected.
http://help.adobe.com/en_US/indesign/cs/using/WS5CEDB81A-0011-4dc9-9DE8-AC7AD4C80076a.html
My other questions:
2° Ive a presentation on which Ive created buttons which tigger pop-up animations
- i have 5 buttons which trigger animations
- the viewer can chose to Click on any of the buttons randomly
- the problem is once the animation is open how can it be close... either:
a) by it self after "40" seconds
b) when ther viewer clicks another button
I'm not sure what you mean - I don't do files with Animations
3° Ive created buttons linking pages..- "go to page xxx"
- when i do a preview and click on the buttons the links dont take me to the right pages
- is that normal? (maybe in preview its suppose to be like that)
Does it work properly when you export it to the finished file?
4° I would like to intergrate YouTube videos in the presentation so they play inside the docment.. when i tried.. it said the 'link isnt a flash video'- what should i do?
InDesign won't link directly to youtube videos. I think your best bet would be to use Downloader to download the video and embed them directly in Indesign.
5° Once i export it into Swf. how how can i visualize it? or put it online?
Thank you for your time.
You can look up how to embed a SWF file into your HTML - but it depends what you mean by "online" there's a dozen ways to get a file "online". -
I just updated my iPhone and would like to change the color of the bubble for the text reply. Mine is now GRAY and it is much more difficult to read. The outgoing text bubble is still blue. Can I do this?
Yes. Well, sort of: instead of a "path", set the pen tool to "shape" in the tool properties. Then set the fill colour to transparent, and the stroke colour to the colour you want. You can also set the stroke width.
Not perfect, but at least you can see the path more clearly - the anchor points and handles still remain the default colour. Open the path panel, and right-mouse click the path shape to create a selection based on that shape. The Paths panel menu also allows you to create work paths based on that shape.
Unfortunately when you try to move the handles the black thin outline appears again until you release the mouse button.
This is one of several things that works better in Photoline: in Photoline, once the path is set to a specific colour, editing the path uses the actual colour and stroke width. which is extremely handy for creating path based selection with awkward background colours and/or a high resolution screen. In Photoline the handles and bezier points are also much, much larger, which makes it rather simpler to work with as well - especially on a higher resolution screen. And when selected the handles and points are a clear red with a black outline - again easier to spot and identify. I just works better, in my opinion. -
LineChart and -fx-text-fill issue: how do I change the color of the labels
Hello everyone,
I'm currently facing an issue when I'm trying to style my LineChart with some CSS. Indeed I would like to change the color of the labels of my xAxis (CategoryAxis) and yAxis (NumberAxis) but it's not working.
In my FXML file I tried to use the style attribute on my LineChart tag using: <LineChart style="-fx-text-fill: white"> with no result, the text remains black (even for the title of my chart). In order to know if the style attribute is well parsed I changed it to: style="-fx-background-color: red; -fx-text-fill: white;". The background is becoming red but the text still remains black.
Finally I tried to define a stylesheet in my controller class with the same properties (red background and white text). My stylesheet is this one:
.chart {
-fx-text-fill: white;
-fx-background-color: red;
}In my controller I do the following line in order to load my CSS file:
this.chart.getStylesheets().add(getClass().getResource("statistics-style.css").toExternalForm());Even with this option the text remains white, while the background becomes red.
What I also tried is to put the -fx-text-file CSS property directly on my axises, but again it seems it is ignored.
I followed the steps described in Figure 8-2 of this site: http://docs.oracle.com/javafx/2/charts/css-styles.htm
Does anybody have an idea or encountered this issue?
Thank you very much,
Thierry.
PS: I'm using JFX 2.1 on MacOS X
Edited by: twasyl on May 8, 2012 7:57 AM
Edited by: twasyl on May 8, 2012 7:59 AMHi,
I figured a solution out to solve my problem. Currently in the documentation it is said to redefine the .chart CSS class in order to change the color of the title and labels text. But this is not working. Strangely the following code changes the font-size of both title and labels but ignores the -fx-text-fill property:
.chart {
-fx-font-size: 20pt;
-fx-text-fill: white;
}In order to change the color of the title I override the .chart-title CSS class:
.chart-title {
-fx-text-fill: white;
}And for the labels:
.axis-label {
-fx-text-fill: white;
}Well I don't know if there still is a bug on the .chart CSS class or maybe that behavior is expected. -
How can I change the color of a folder icon and also the color of the text
I am using Yosemite. Is there any way to change the color of a folder icon and also the color of the text?
You can't. You can't individually set the properties of just one array element.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps -
Where do I change the color of this text in the blog page?
I'm trying to add a blog page to my non-template iWeb site. On the Main Page, I'm unable to change the color of the font in the hyperlinks, where the default reads "Day of Longboarding" and "Read more…". I don't know what I might be overlooking. Any pointers? Thanks…
That's not something iWeb has a menu item for. However with the proper javacode you can change a lot about the navbar. This deoo page describes how: Change Navbar Text and Background Color.
OT -
When writing an email on ipad can I change the color of the text half way through to highlight relevant detail?
If so, how?
I have looked and looked.....
Thanks,
BelindaIf you're in the US
You can get information about an order you placed on the Apple Online Store through the Order Status page. If you prefer, you can also get order status or make changes by phone at 1-800-692-7753.
Contact them and ask. -
Can you change the color of highlighted text?
I want to know if there's a way to change the color of text that has been highlighted, not the highlight itself. I know that to change the color of the highlight itself, you go to the Appearance Preference Pane and change the highlight from there, but I want to know if there's a way to change it so that when I highlight text, the text itself changes color for higher contrast against a dark colored highlight. I think MSWord does it, I have some memory of working on Windows computers back in the day working like that, is there a way to make that sort of change on a Mac?
No, I know how to change the color of the HIGHLIGHT, I want to change the color of the TEXT that's being highlighted, so if, for example, I highight black text with a dark red/blue/black highlight color, the text goes white for greater contrast and doesn't turn invisible for lack of contrast. Is there a way of doing that?
-
Can i change the color of the text bubble?
I recently updated the iphone 4S with the new upgrade. Is there a way to change the color of the text bubble from that hideous green?
No, unfortunately not...
Green means SMS and blue means it's an iMessage but it's not customizable.
You can leave feedback for Apple though about it if you like at: www.apple.com/feedback
Good luck! -
I am stuggling here! I am colorblind. I need to change either the color of the background or the color of the text on the layers section on the Timeline. I simply cannot read/see what is currently showing. It is a very light blue background with white text and white dots for seeing, locking, or setting the outline color. I need to either change the text color and dots to black so I can see them, or try to change the background color to a dark blue so I can read the white text. Changing the text color would really be my preference. How do I do this? Please help. Adobe hasn't been very concerned about colorblindness when developing these products. I can barely make out all the light grey/grey/dark grey/grey stuff. Now this!
For Windows you can adjust your Theme (or download a new one and use that). This will alter the color of each layer, for example if you use Classic then it will use a very dark blue for layers that will provide higher contrast. I've downloaded other custom themes in the past that use a very dark grey for example.
(By the way, for Mac users go to Appearance in System Prefs and choose a different Highlight color - you can choose a default or custom one. That color is used for the layer color). -
I have been using LabView for a almost 18 months now. There was no problem which I could not solve with help of all resources available. But, this is one where I am scratching my head since long time now.
I would like to change colors of each individual text in Ring control programmatically. I have attached example VI. In this VI, I change background color of ring text, but it changes only the current (active) background color, so when you pull down the whole menu, it shows same default color for all the text background (not even the color I asked it to). Is there anyway I can define individually as to what color should be related to each text in ring menu?
Attachments:
Ring Menu Colors.JPG 16 KB
RGB Ring.vi 33 KB" Is there anyway I can define individually as to what color should be related to each text in ring menu?"
Well not with a ring and not programatically.
The best I can suggest is a picture ring, see below.
Ben
Message Edited by Ben on 11-18-2005 02:16 PM
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction
Attachments:
Picture Ring.JPG 5 KB -
How to change the color of the text field of form
Hi ,
Is there any way to change the color of the text field of the form........
Thnx in advance .......
Cheers,
EmanHi Bob. I'm new to these forums and I'm not sure of protocol and exactly how this is supposed to work, so If I'm doing this wrong then please excuse me and let me know.
I liked you solution on 'How to change the color of an Item on a form' using <blink>.
I'm new to this application and coding as well so its kind of foreign to me.
Working on a Report Page,
I would like to have item, :P1_JOB_NO blink when the difference between sysdate and :P1_DATE_DUE < 7 days.
I can identify the job_no which should blink by using the sql statement:
SQL> select job_no from oax_projects07 where
2 (sysdate - date_due < 7) and
3 emp_name = 'GARY PILKENTON';
JOB_NO
20060627 050
But I dont know the proper syntax to make it blink,
or when to plug the syntax into.
ie, is it a process, a validation, etc.
Do you have any advice for me? -
How to change the color of the text in the Text Field or in the text area??
HI all,
i think its a very simple problem, still, can anyone tell me how i can change the color of the text and also its font, before i display it in either a textfield or a text area.
bharathJust Use:
JTextField.setForeground(Color.RED);
so SIMPLE na!
Balakumar .M
http://i5bala.blogspot.com
-- -
How do you change the color of the sign and fill text to the color blue
How do you change the color of the sign and fill text to the color blue in a pdf document
Is this using the "Fill & Sign" tab of https://cloud.acrobat.com/fillsign (for now text input is only black) or maybe using the Fill & Sign tool in Adobe Reader XI, or another application?
Thanks,
Josh
Maybe you are looking for
-
All songs have vanished from iPod and iTunes won't read it
Hi there. I'm experiencing a rather distressing problem with my 60GB iPod Photo. I was listening to the iPod yesterday morning and nothing was out of the ordinary. Then I plugged it into my work computer (a desktop G4) and iTunes popped up with the "
-
Problem in text file attachment while sending to lotusnotes
Hi friends, Good day. I am sending the ALV report data as a text file to lotus notes. I am getting the text file as an attachment and finding data while opening it. But data is not coming properly. I am getting some space in between two rows in text
-
Desktop delivery address - possible options
Hello all, Classic scenario, EBP 5.0, R/3 4.7 As we have more than 3000 users who will have desktop delivery of ordered items I would like to have Ship-To address defined from employee master record coming from HR system. This address must be visible
-
Flash builder 4.7 periodic workspace save
Hi users! I've recentlly installed Flash builder 4.7. After 1/2 days without any issue, i encouter now an issue that make me crazy! It's appen when FB try to save my workspace, my system become really unstable (sometime Kernel panic!!! ) for a while
-
about changing my security questions' answer, I logged into my apple Id but there is no option of changing that...