Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TableView expands when adding new elements #413

Closed
ghost opened this issue Dec 22, 2021 · 3 comments
Closed

TableView expands when adding new elements #413

ghost opened this issue Dec 22, 2021 · 3 comments

Comments

@ghost
Copy link

ghost commented Dec 22, 2021

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

@reikjarloekl
Copy link
Contributor

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

@ghost
Copy link
Author

ghost commented Aug 29, 2022

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

@ghost
Copy link
Author

ghost commented Nov 17, 2022

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

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant