selector.containers seems to style the background of the component. selector.label does not do anything, I think.
However, container does allow me to set a size that is lesser than it shows here. I have tried preferredSize = new com.jme3.math.Vector3f(100, 10, 1) but it stays this size.
I also want to style the background of the options-list which currently does not have a background.
Look in the glass style for examples on what is likely what you want to set.
Otherwise, the javadoc will tell you which attributes are stylable because they will have the StyleAttribute annotation.
There is no single full list because it would depend on the classes available to you and what custom attributes you may have added StyleAttribute annotations to yourself.
re: preferred size, the only way to set the preferred size is at runtime.
A Button is a Label which is a Panel. Everything you can do on Panel, you can do on Label. Everything you can do on Label, you can do on Button.
But it extends container which extends panel.
This part could be better documented but generally the children of a composite GUI element follow a certain naming convention. So whatever the parent is there will be dotted children and they try to always end with what they actually are (.label, .button, etc.) so that they pick up the default styling for those.
So find out actual child names, unfortunately you have to look at the top of the .java files.
It’s just a ListBox so whatever styling works for ListBox will work for selector.list… etc.
The selector’s list box has a visible items (maybe not stylable) that can be set. it is likely overriding (or appearing to if you have no background set) the preferred size.
If I am reading the code right, ListBox is used for the popup list - that one I have under control.
It is the default appearance in the menu. If I am not mistaking, that part has the ID ‘item’. When there is no popup. I have tried forcing every part to a preferendSize, but nothing helps to get the lowest row - or any other - getting any less high.
My only guess is that the outer container is stretching them because it’s been forced to be too high for the things in it. If you want the outer panel big for other reasons then you can change its layout’s fill mode for the y direction to he FillMode.Last and add an empty label at the bottom that will stretch to fill the rest.