Gabriel95 / scalafx

Automatically exported from code.google.com/p/scalafx
Other
0 stars 0 forks source link

Assigning columns to TableView does nothing #41

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It is not possible to assign columns to a TableView using TableView#columns. 
For instance, following code complies fine, but table will have no columns:

  val firstNameColumn = new TableColumn[Person, String]("First Name")
  val lastNameColumn = new TableColumn[Person, String]("Last Name")
  val table = new TableView[Person](model.getTeamMembers) {
    columns += (firstNameColumn, lastNameColumn)
  }

As a work around you need to use:

  val table = new TableView[Person](model.getTeamMembers) {
    delegate.getColumns += (firstNameColumn, lastNameColumn)
  }

Original issue reported on code.google.com by jpsacha on 26 Feb 2013 at 1:05

GoogleCodeExporter commented 8 years ago

Original comment by jpsacha on 26 Feb 2013 at 2:19