Osama Al-Banna
Osama Al-Banna

Reputation: 1515

Can't change TableView font-family using both setStyle and CSS editing

I'm trying to use "arial" in my tableview cells ,but refused to change , I tried this in my controller class:

productListTableView.setStyle("fx-font-family:arial;");

and this in my CSS file

.root *{
-fx-font-size: 20px arial;
-fx-font-family: "arial";
}

.table-cell * {
-fx-font-size: 20px;
-fx-font-family: "arial";
}

I remember it's possible to set it manually from Java using setStyle()

Upvotes: 0

Views: 143

Answers (1)

James_D
James_D

Reputation: 209299

The following works for me

.table-cell {
    -fx-font: 20px arial ;
}

Upvotes: 1

Related Questions