Search code examples
javaswingribbonradiance-flamingo

Flamingo RibbonBand: how to disable Ctrl+F1 functionality


When you double-click on menu or press Ctrl+F1, ribbon will be hidden. What is the easiest and most correct way to disable this functionality?


Solution

  • Turns out there is no way to turn off ribbon's minimising functionality by one of the expected common ways (like setting some ribbon parameter). Following code does the trick:

    getRibbon().addPropertyChangeListener(new PropertyChangeListener() {
            @Override
            public void propertyChange(PropertyChangeEvent evt) {
                if (evt.getPropertyName().equals("minimized")){
                    getRibbon().setMinimized(false);
                }
            }
        });