I have Forget password label in JavaFX application that I applied underline on it.
UI
I know this isn't possible to do with a basic property, but instead I have applied the following CSS to the label and I don't know how to set Spacing between the text and the underline
css
Specifying the underline offset
JavaFX css does not have a text-underline-offset attribute as far as I know. You could display the link in a WebView and configure the offset using web css rather than JavaFX css, but I wouldn't really recommend that.
JavaFX private implementation uses an underline offset, but that is not public API and cannot be controlled via public API, so I don't think that helps you.
Related info on clickable text (hyperlinks)
For clickable text, you should use a Hyperlink rather than a Label.
See the Hyperlink tutorial and css.
Hyperlink, by default only displays an underline on hover, to have it always displayed, see the related question:
Javafx Hyperlink: Style to influence visibility of 'underline' of link
Related
I am aware that changing the background of buttons in RCP apps in e4 does not work.
From the Vogella tutorial Eclipse 4 CSS Styling.
"For example, the SWT implementation for Windows does not allow to set the background color of the Button and the ScrollBar widget."
I should still be able to change the color of the text written for radio and checked buttons. But it doesn't seem to be applied. The wizard remains with black text despite I set it to light grey in my CSS file using the Pseudo Classes Button:checked, :active, or :selected
Same with Group titles
Testing here it appears that this will work only if the button is already checked when the dialog appears.
Changing the check state of the button doesn't change the styling.
This is because the code in the Button CSS handler org.eclipse.e4.ui.css.swt.dom.ButtonElement does not currently support dynamically changing the styling to match the check state.
There is a property you can set to turn on dynamic styling:
System.setProperty("org.eclipse.e4.ui.css.dynamic", Boolean.TRUE.toString());
BUT Eclipse bug 362532 says that this can cause problems.
So this basically isn't going to work.
An alternative is to use IStylingEngine and change the id or class of the buttons in a selection listener.
Is it possible to style autocompletion boxes that appear under text inputs? I'd like to change background color and border.
It is possible to do this by using javascript.
Another way to do this is by opening up your developer tools.. "View - Developer - Developer Tools" using the magnifying glass to hover your element, get the class or ID name and make direct edits in the right hand side, then paste that code within your stylesheet. ( sounds harder than it is! )
I have a RadioButtnList. I want change body background color based on radio button value.
for example change color of background circle to red!
After user has made selection and depending on the selected value, you would use css to change the appearance of your page.
To learn about how to use the RadioButtonList control as well as determine selected values, check out this link: RadioButtonList example: how to use RadioButtonList control in asp.net and RadioButtonList Class.
To learn about changing background colors using CSS, check out this link: CSS Background and CSS Tutorial and Learn CSS step by step.
For additional CSS information, check out this google search.
Hint
This assumes you want the entire page to be red:
html, body{
background-color: #FF0000;
}
EDIT
If you really mean to change the 'circle' of the radio button as your recent comment suggests, then you cannot change it. Radio buttons are native controls. What you should do instead is to make your own radiobutton-like control using an image for its selected and non-selected states.
Here's a useful link (includes source code) that I think will get you moving: Resources for web designers, though you might find a good jQuery solution as well.
Good luck!
I wish to change the way ListBox looks using CSS
Change the border color - Tried using the usual border-color:red. Worked on Firefox. No effect on IE Still the standard blue color
Change the Color of the arop down arrow. No idea how to go about doing it.
Any idea how do i do this
Thanks
J
Check the rendered html in firebug and add appropriate css in the index.html (or the page where you are including the gwt module). In the GWT code add the css class in the listbox by using
listBox.setStyleName("the classes defined in the css for list box")
Does anyone know the name of the CSS classes responsible for styling the dojo promptMessages (or invalidMessages) tooltip associated with ValidationTextBoxes.
Normally Firebug does a great job of revealing all the inner workings of CSS, but in this case the tooltip prompt disappears when I try to inspect it!
I am intending to play with such CSS properties as padding and width for the promptMessage tooltip.
Dijit Tooltip template reveals the structure:
<div class="dijitTooltip dijitTooltipLeft" id="dojoTooltip">
<div class="dijitTooltipContainer dijitTooltipContents" dojoAttachPoint="containerNode" waiRole='alert'></div>
<div class="dijitTooltipConnector"></div>
</div>
Actually, although my question remains for general purposes, in the specific case that interests me, it's probably as easy to include as part of the tooltip content the css markings that will do what I want:
dijit.form.ValidationTextBox({
promptMessage = "<div class='customizedWidth'>Blabla</div>"
},myNode);
That said, I would still be eager to learn the dijit class for that specific tooltip. It would become necessary in the case of wanting to change the look of that entire class...
I had a similar problem when trying to debug why the css for the ToolTip on the ValidationTextBox was showing up as a plain grey box instead of using the proper css. The normal way to view css and other information in Firebug does not work because the tooltip will disappear when you click on it. However, I found that using the standard Web Developer Toolbar you can go to the CSS menu item and select View Style Information (or just do cmd-shift-Y on your keyboard). This will turn the cursor into a crosshair. You can then move the crosshair over the tooltip and the entire css chain will display for the tooltip. This solved my particular styling problem by providing the hint that I needed to apply the proper theme class to the body tag. The system I am coding against does not allow me to directly alter or add to the body tag in the generated html. However I used dojo to add the class after load like this:
dojo.query("body").addClass("claro");
and everything (Dialogs and tooltips) work great now.