0

Whenever I open my JavaFX program, I there is a blue box around the first item in a TableView. Once the user clicks away, it's gone. Is there a way to remove it in a custom css file?

Blue Box

I've tried setting -fx-focus-color in .root and .table-row-cell (and much more that I can't remember) but nothing has worked.

Community
  • 1
  • 1
Kyefer
  • 98
  • 2
  • 12
  • Have you tried setting [`-fx-faint-focus-color` as in this answer](http://stackoverflow.com/a/15749763/1155209)? – jewelsea Oct 01 '15 at 04:21
  • You can debug this using [ScenicView](http://fxexperience.com/scenic-view/) or the [SceneBuilder CSS Analyzer](http://docs.oracle.com/javafx/scenebuilder/1/user_guide/stylesheet-support.htm). – jewelsea Oct 01 '15 at 04:22
  • 2
    hmm... you really want to remove the focus indicator? That's breaking user expectations. That said: since some versions (can't recall when it started) the initial focus is forced onto the first item - so you could try to clear it – kleopatra Oct 01 '15 at 09:14
  • @kleopatra I made a custom highlight so I don't want to see the default focus indicator – Kyefer Oct 01 '15 at 19:53

1 Answers1

0

I couldn't change the color to transparent but I was able to hide it by using

.table-row-cell:focused{
    -fx-background-insets: 0;
}
Kyefer
  • 98
  • 2
  • 12