I want that the 'underline' of a hyperlink in JavaFx is always visible. How can I achieve this ?
You can achieve this using css like this
link.setStyle("-fx-underline: true");
Or you could create a css file if you want to style your link more
Related
I want to cusomize QToolButton class so it won't show arrow subcontrol when button has a context menu. But I need to apply this style sheet only for buttons with QToolButton::MenuButtonPopup popup mode. How to do it properly? I have tried the following sheet:
QToolButton[popupMode != "1"]::menu-indicator {image: none}
but it doesn't work.
This solution what worked for me. I used a dynamic Property (bool) in the Designer to convert a Check Box into an Indicator Lamp.
QCheckBox[indicator=true]::indicator::checked { image: url(:themes_22x22/Icons_oxygen22x22/emblems/emblem-important.png);}
QCheckBox[indicator=true]::indicator::unchecked { image: url(:themes_22x22/Icons_oxygen22x22/status/user-online.png);}
Simply put, I have a JavaFX Textfield that I wish to 1) change the text color on, and 2) change it back to that specified in CSS. Does anyone know how to (generally) access css colors etc. from within the JavaFX code?
AnyFxElement.setStyle(String elementCss);
For source of all the css capabilities I reccomend looking up caspian css.
To remove a style use the code:
// remove the background color on the button
yourElement.setStyle(null);
To set it back to it's default style:
// set the button style back to the default class
yourElement.setStyle(".yourStyle");
I am trying to do the following:
I have set up a number of Magento attributes for my products & I want to display an icon next to an attribute called "Color" as well as attach an alt tag to this icon/image. My theme has each of the attributes set up as a dt tag, & so the css I am trying to apply is as follows:
dt[foo^="Color:"]{background: url(http://xyz.com/skin/frontend/default/default/images/warning.png) no-repeat 100% 0%;}
and here is the markup:
<div class="white-box-inner">' '<dl class="attribute-list clearfix">``<dt class="first">Size:</dt>``<dd class="first">21</dd> <dt>Manufacturer:</dt>``<dd>Hat Designs</dd>``<dt>Color:</dt>
<dd>Red</dd>``<dt>Fabric</dt> <dd>Felt</dd> </dl> </div>
This however does not display the icon I'd like to appear.
I'm also not sure how to have an alt tag associated with this icon either via css. I'd rather not mess with the template files. Any help is appreciated.
Thanks.
-TM
From your markup it looks like you're trying to select an element by its content. Attribute selectors only select by attributes; they don't select by content.
There was going to be a :contains() pseudo-class, but it was dropped from the spec and so you can't do this using CSS selectors anymore.
jQuery implements :contains(), though, so you could simply use jQuery to add a class and style that class.
Additionally, you cannot associate alt text or a tooltip to a background image in CSS. You're going to have to go through the JavaScript route to achieve this.
Is there a way - or anyone knows if someone already made this available - a way to style links in the form of buttons in the aristo style?
http://aristocss.com/
Using this CSS -reform a regular link to the style of a button?
You can more than likely copy all the CSS for those buttons and just use it on a link. In fact you'd probably be able to rip out a bunch of reset stuff as buttons often have all sorts of browser defaults which a link doesn't have.
So change:
button {
// Cut
}
to:
a {
// Paste
}
Hope that helps :)
(The css you need by the way starts right at the top of this file: http://aristocss.com/css/aristo.css)
Sure - just grab the CSS they're already using, change it from button to a.btn, add display:block, give your link a class of "btn" and you're all set.
i am creating a application on extjs4
i wanted to attain the css selection mouse hover property on the textfields and combo box,the effect where.. background color can change on overcls in extjs
please help if you can't understand my question i will post it again!
Thanks
Here is how to do it:
On your field config add your custom css class like this: fieldCls: 'required'
Create your custom CSS class like this:
.required:hover {
background-image:none;
background-color:#FFFFCC;
}
Include your custom css file on the page