How do I get ListSpinner to resize based on the size of number being displayed?

19 views
Skip to first unread message

Jeffrey Guenther

unread,
Feb 20, 2014, 4:49:15 PM2/20/14
to jfxtra...@googlegroups.com
I'm using 'org.jfxtras:jfxtras-labs:8.0-r1-SNAPSHOT' in my code.

Is there something special required to make the spinner to expand with large numbers. I have a range with one and two digit integers and it will only show the first digit. 

My code: 

ListSpinner<Integer> spiner = new ListSpinner<>(2, 28); 

Also, is there a way to move the buttons closer together? I expected the buttons, when vertical, to be the height of the label. They are quite far apart and make button much taller than the label's height. Is this something I should style with CSS? If so, what are the selectors? I can't find much documentation on the control.

Thanks,
Jeff

tbeernot

unread,
Feb 21, 2014, 1:14:58 AM2/21/14
to jfxtra...@googlegroups.com
The amount of space and the size of the arrows are defined in CSS, and you can override that:
https://github.com/JFXtras/jfxtras-labs/blob/2.2/src/main/resources/jfxtras/labs/internal/scene/control/ListSpinner.css

The width of the spinner is not something I've looked into specifically, you are the first to complain about it. Can you give me a small example program so I can take a look? At the very least you can force the width by setting a minimum width. Documentation is available through the JavaDoc.
http://jfxtras.org/doc/8.0/index.html?jfxtras/labs/scene/layout/GridPane.html

I know there could be more, but as Jonathan put is so eloquently; "open sources takes a heap of time", spare time that is. Right now I'm working on separating out certain parts of JFXtras into a formal 8.0 release in sync with J8. So there is a deadline there, I'll be able to look into this once that is done.

Tom
> --
> You received this message because you are subscribed to the Google Groups "JFXtras Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jfxtras-user...@googlegroups.com.
> To post to this group, send email to jfxtra...@googlegroups.com.
> Visit this group at http://groups.google.com/group/jfxtras-users.
> For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages