0

In version 1.5 of the apache pivot project the TabPane class supported setIcon() and setLabel(). These methods were removed in version 2.0. Does anyone know what I should now be using for these calls?

Cœur
  • 37,241
  • 25
  • 195
  • 267
BillMan
  • 9,434
  • 9
  • 32
  • 52

2 Answers2

1

In version 2.0.x of Pivot, you would do: TabPane.setTabData(component, new ButtonData(...)); after adding the component itself to the TabPane sequence (with tabPane.getTabs().add(component); as you've said.

rwhitcomb
  • 106
  • 2
0

If I understand the tutorial correctly, it would be:

tabPane.getTabs().add(component)

where component is a Label or ButtonData that contains the icon and text.

Here's an example of TabPane in version 2.0.2 of Apache Pivot.

Gilbert Le Blanc
  • 50,182
  • 6
  • 67
  • 111