Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

limiting the amount of visible rows in a JavaFX ListView control

se32862378Apr 9 2013 — edited Apr 9 2013
Is there a way to specify the preferred height of a JavaFX List view in terms of number of rows and not in term of pixels ?
I am currently writing something like:

myList.setPrefHeight(100);

to limit the amount of scrollable items to 4 rows. But it is a bit of guessing, I would like to specify that I need to see maximum 4 rows, not the approximate amount of pixels that these 4 rows may use.

Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 7 2013
Added on Apr 9 2013
2 comments
2,239 views