JavaFX Text in TextFlow ignores StyleClass? -


i try use javafx textflow view styled text. following code not text styling.

public node createtext(string t,string cls){     text ret = new text(t);      ret.getstyleclass().add(cls);     return ret; } 

when replace text label works properly, things \n not work anymore. how can use text class css classes?

edit: requested short example of default.css

.defaultelementattr{     -fx-text-fill:#48a711;   }  

-fx-text-fill css property of label not css property of text.

if want change color of text object css, use -fx-fill property:

.defaultelementattr {     -fx-fill:#48a711;   }  

Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -