• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

color any column tableview javafx

 
samir hamiche
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am a beginner in javafx
I want in tableview color any column (i used css)
help me pleas
 
Campbell Ritchie
Sheriff
Posts: 51341
86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Please show us what you have so far. Also what tutorials are you using?
I shall move you to our FX forum.
 
samir hamiche
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello
I want in tableview color this column (i used css)
help me pleas
Capture.PNG
[Thumbnail for Capture.PNG]
 
John Damien Smith
Ranch Hand
Posts: 296
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is actually pretty difficult to do well. The difficulty comes because there is subtlety (and complexity) in the JavaFX CSS definitions for a TableView. Just coloring the standard cells is fine. But what should be done if a row is selected? There are different colors for that usually (a gray color if the selected row is not focused and a blue color if it is). I am not sure how to set the "correct" coloring for those kind of cases.

However, if you just need a static highlighting of a column, you can do something like this:





Perhaps that will be good enough for your purposes.
 
samir hamiche
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you very much
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic