This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

How to set size of column equal to size of column's header in TableView?  RSS feed

 
Ranch Hand
Posts: 514
1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

I use TableView in javaFX8. I need two things:
1. Disable auto_resizing of columns. I want TableView not to resize when its parent resizes. But columns still should be resized.
2. Set column's width to be equal to width of column's header. How to access column header in TableColumn?
 
Bartender
Posts: 1104
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am unable to understand your questions clearly, but, will try...

Volodymyr Levytskyi wrote:1. Disable auto_resizing of columns. I want TableView not to resize when its parent resizes. But columns still should be resized.


Check this link

Volodymyr Levytskyi wrote:2. Set column's width to be equal to width of column's header. How to access column header in TableColumn?


Am unable to understand the first part of the question. For the second part, the graphic property contains the header.
 
Bin Smith
Ranch Hand
Posts: 514
1
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for reply!

I meant that column's width should be equal to column's header width or to the widest cell's width.

How to get width of header and use it as width of column?
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1104
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry for my late reply. I still don't get the question - I mean, by default, the width of a column is same as the width of the column - isn't it?

So, why is it different here. I think you should give more details on this...how about the image of current output?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!