JavaFX - TabPane标题上的“适合”选项卡(宽度)

时间:2015-09-02 10:02:53

标签: javafx tabs tabpanel

我想在TabPane上使用我的两个标签 TabPane.setTabMinWidth()方法。

我认为一个简单的分工可以解决问题。

   tabPane.setTabMinWidth(tabPane.getPrefWidth()/2);
   // in this approach TabPane add Menu Button on the right.
   // I also tried to divide my different containers, BorderPane
   // and the Stage.

然后我尝试另一种方法

  tabPane.setTabMinWidth((tabPane.getPrefWidth()/2) - 20.0);
  // Minus 20.0 leave atleast 10 to 15 pixels (estimated)
  // from last tab index to edge of the stage.
  // Minus 20.0 below will show Menu Button on the right.

我如何将Tabs完全放在TabPane上?

看起来像这样: http://www.pinstopin.com/of-login-page-templates-will-help-you-web-app-ui-kit-user-form-/d2ViYnlkemluZSpjb218d3AtY29udGVudHx1cGxvYWRzfDIwMTR8MDN8YXBwX2xvZ2luX2Zvcm1fbWFpbipqcGc_d2ViYnlkemluZSpjb218d2ViLWFwcC1sb2dpbi1wYWdlLXBzZHw/

0 个答案:

没有答案