PreferencesFX icon indicating copy to clipboard operation
PreferencesFX copied to clipboard

TableView expands when adding new elements

Open DaveJarvis opened this issue 3 years ago • 2 comments

Replicate When adding new rows to a TableView, the table expands by two pixels.

  1. Create a SimpleTableControl that extends SimpleControl.
  2. Add a TableView and ButtonBar to the table control, both contained in a VBox.
  3. Add an Add button to the ButtonBar.
  4. Wire the Add button to add a new row to the TableView.
  5. Create a MapField subclass of Field that renders using the SimpleTableControl.
  6. Create a Category using the MapField.
  7. Launch the GUI.
  8. 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:

tableview-01 tableview-02 tableview-03

DaveJarvis avatar Dec 22 '21 03:12 DaveJarvis

This might have been fixed with #430 (change to preferencesfx/src/main/java/com/dlsc/preferencesfx/PreferencesFx.java).

reikjarloekl avatar Aug 29 '22 20:08 reikjarloekl

Cool! I'll check it out when the next release is published.

ghost avatar Aug 29 '22 21:08 ghost

This bug is fixed, but another bug now exists: #440 .

ghost avatar Nov 17 '22 06:11 ghost