0

Two problems:

  1. I'm trying to set my table backgrounds, which I've achieved. However, if I specify a default table width, the unused part of the table defaults to the javafx table appearance. How can I set this with CSS?

https://drive.google.com/file/d/0B_YEgxccklmHSC1BcTdULWJUUFk/view?usp=sharing

https://drive.google.com/file/d/0B_YEgxccklmHZ0d2VDFZYUVDc1E/view?usp=sharing

  1. My other problem, I can't set the background behind my tabpanes to white. I cannot find the syntax for this. See below.

https://drive.google.com/file/d/0B_YEgxccklmHZ1RFNHNlY1pYTGc/view?usp=sharing

Any help appreciated.

Thx!

wax_lyrical
  • 922
  • 1
  • 10
  • 22

1 Answers1

1

Regarding 2.) Try setting the background color of tab-header-background. Here an example:

.tab-pane>*.tab-header-area>*.tab-header-background {
   -fx-background-color: -fx-outer-border, -fx-text-box-border, white;
}

enter image description here

I copied this snippet from the default Modena theme and modified it. The '>' selector selects direct children and the '*' is called the universal selector and it selects a single element of any type. However, it can be ommitted here, since it is used in combination with a simple selector.

Sorry I do not know how to solve your first problem yet. Maybe I'll find something.

Community
  • 1
  • 1
gfkri
  • 2,151
  • 21
  • 23
  • Nice. That worked. Can you explain your syntax, the ">*", and fact that your -fx-outer-border is comma separated from the -fx-background-color? Thanks – wax_lyrical Feb 10 '15 at 16:57
  • Do you mean, why there are more than one color (`-fx-outer-border, -fx-text-box-border, white` each comma separated) ? – gfkri Feb 11 '15 at 09:53
  • Thanks for your help. For anyone else that reads this, I found the caspian.css (the default FX stylesheet), and have solved most of my problems, except the one where tables columns are below their fill size, as per my examples.) – wax_lyrical Feb 12 '15 at 11:06