java - How to reset back to default css after adding style? -


basically have changed css text field in javafx adding style class this:

textfield.getstyleclass().add("textfieldstyle"); 

but want able revert original appearance. since original appearance in case default skin javafx, can't find original layout textfields. found textfieldskin properties here, jungle, , can't find color of -fx-control-inner-background, -fx-text-box-border , -fx-focus-color, want know.

i've triedtextfield.getstyleclass().remove("textfieldstyle"); , think remove new css, doesn't apply old 1 again.

to reset element's default styling after setting using .setstyle("css settings....."); can use -

textfield.setstyle(null); 

i'm not sure if work on it's own element that's had class applied using .getstyleclass().add("textfieldstyle"); if not -

textfield.getstyleclass().clear(); textfield.setstyle(null); 

Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -