tornadofx icon indicating copy to clipboard operation
tornadofx copied to clipboard

Configure Drawer to disallow collapsing current item

Open yevhenii-nadtochii opened this issue 4 years ago • 0 comments

I want to split main view in tabs with vertical tabs-switching -> I use drawer with several items, one of which is expanded by default and multiSelect = false. It works great and looks exactly as I want. But a user can just unselect (collapse) that only selected item and get white background with nothing. So, the question is: how to disallow drawer collapsing current item ? so that only switching between tabs was available.

I've tried tabpane and it behaved as I want but looked a bit different to what I want. Applying Drawer's CSS helped pretty much, but not completely. So, to summarize

  1. Can I somehow force Drawer to behave as TabPane (allow switching between tabs only) ? I wanted to modify button click handler, but items' button marked as internal in Drawer.kt
  2. May you consider modifying Drawer.kt in order to replace multiselect with selectionMode = [multiSelect, mandatorySingle, optionalSingle] ? where optionalSingle is default.

Thank you !

yevhenii-nadtochii avatar May 28 '20 17:05 yevhenii-nadtochii