PreferencesFX
PreferencesFX copied to clipboard
TableView expands when adding new elements
Replicate
When adding new rows to a TableView
, the table expands by two pixels.
- Create a
SimpleTableControl
that extendsSimpleControl
. - Add a
TableView
andButtonBar
to the table control, both contained in aVBox
. - Add an
Add
button to theButtonBar
. - Wire the
Add
button to add a new row to theTableView
. - Create a
MapField
subclass ofField
that renders using theSimpleTableControl
. - Create a
Category
using theMapField
. - Launch the GUI.
- Click the
Add
button.
Expected
The TableView
width remains fixed.
Actual
The TableView
increases by two pixels.
Work around Each time the button is clicked, resize the table:
table.setPrefWidth( table.getPrefWidth() - 2 );
Additional details For implementation details see:
Screen shots The screen shots show the button bar moving to the right and the horizontal scroll bar increasing in size:
This might have been fixed with #430 (change to preferencesfx/src/main/java/com/dlsc/preferencesfx/PreferencesFx.java).
Cool! I'll check it out when the next release is published.
This bug is fixed, but another bug now exists: #440 .