0

Hello I have a JavaFX tool with a TableView in it. This view has a lot of columns. At the moment i set the column resize policy to "CONSTRAINED_RESIZE_POLICY". It's fantastic that every column is always on the screen and if I resize the window bigger then it increases the width of every column. But the stupid thing is, when I want to resize just one column, that the columns on the right side getting smaler. Is there a solution which make this thing better? My other solution is not to use this policy and work with prefWidth sizes but then the columns don't automaticaly get bigger when i resize my window bigger.

Thank you for helping.

  • This has the potential to become pretty complex. It sounds like you want the behavior of CONSTRAINED_RESIZE_POLICY, where columns automatically resize to fit the width of the table… unless the user has manually resized one, in which case it should retain exactly that size even when the table itself is resized. Or should it continue to change its width when the table’s width changes? Retain its width proportionally, perhaps? – VGR Sep 20 '16 at 18:30
  • To conclude it should have the behaviour of the CONSTRAINED_RESIZE_POLICY when the whole window is getting bigger. But when the window is getting smaller or a single column is getting resized it should have the behaviour of the default policy. So that means when window is smaller it should have a scrollbar for the content and when a column is resized the other columns next to it should just go away but have the same size. But it sounds like there is no easy way or maybe even there isn't any way to do this. How do you handle your TableViews? Do you use the policy or not? –  Sep 21 '16 at 06:37
  • I use the default resize policy, but I sometimes bind a TableView's preferred width to the sum of all of its columns’ preferred widths. – VGR Sep 21 '16 at 12:04

0 Answers0