Prevent tab pane from closing even when empty

Issue #52 resolved
Former user created an issue

In our application we have several tab panes with a main central one and minor ones at the sides. We are using DetachableTabPane so that users can drag tabs between them and this works very well. However, we do not wish for the central tab pane ever to be closed, even if all its contents are removed.

Currently we achieve this by giving it a different scope from the other tab panes, which works, but means that users cannot move tabs into it from the other panes, which is inconvenient. We would find it very useful if there could be a property on a tab pane that simply ensures that it is never closed.

Comments (2)

  1. Amrullah

    Hi,

    Take a look at DetachableTabPane.setCloseIfEmpty(). That method was added on last December to prevent Stage containing that tabpane be closed with it doesn't have any tab. Ensure you are using the latest TiwulFX.

    Let me know if it doesn't solve your problem.

  2. Log in to comment