# CallOutBox not displayed if the editor palette is disabled

**URL:** https://forum.foleysfinest.com/t/calloutbox-not-displayed-if-the-editor-palette-is-disabled/177
**Category:** PluginGuiMagic
**Created:** [20 November 2023 09:01 UTC](https://forum.foleysfinest.com/t/calloutbox-not-displayed-if-the-editor-palette-is-disabled/177 "2023-11-20T09:01:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rafzael](https://forum.foleysfinest.com/letter_avatar_proxy/v4/letter/r/aeb1de/32.png) [@rafzael](https://forum.foleysfinest.com/u/rafzael)
#### Post date: [20 November 2023 09:01 UTC](https://forum.foleysfinest.com/t/calloutbox-not-displayed-if-the-editor-palette-is-disabled/177/1 "2023-11-20T09:01:38Z")

</div>

Hello,

I’m trying to use a CallOutBox in a plug-in I made using the Magic GUI Plugin module.

I’m creating an item, use FOLEYS\_DECLARE\_GUI\_FACTORY and then builder-\>registerFactory(…

I launch the CallOutBox from the mouseDown overridden method of my component like this:

```auto
        if (event.mods.isLeftButtonDown())
        {
            auto newEqPanel = std::make_unique<EqualizerPanel>();       
            newEqPanel->setSize (250, 500);
            newEqPanel->setKnobs(lowFreq, 0);
            newEqPanel->setKnobs(lowGain, 1);
            newEqPanel->setKnobs(midFreq, 2);
            newEqPanel->setKnobs(midGain, 3);
            newEqPanel->setKnobs(highFreq, 4);
            newEqPanel->setKnobs(highGain, 5);
            newEqPanel->setLookAndFeel(&m_Skeum);
            DBG("CALL_OUT_BOX");
            #if JUCE_VERSION > 0x60001
            juce::CallOutBox& coBox = juce::CallOutBox::launchAsynchronously (std::move(newEqPanel), getScreenBounds(), nullptr);
            coBox.setLookAndFeel(&m_Skeum);
            #else
            juce::CallOutBox& coBox = juce::CallOutBox::launchAsynchronously (newEqPanel.release(), getScreenBounds(), nullptr);
            coBox.setLookAndFeel(&m_Skeum);
            #endif
        }

```

It works perfectly if FOLEYS\_SHOW\_GUI\_EDITOR\_PALLETTE is enabled.  
But as soon as FOLEYS\_SHOW\_GUI\_EDITOR\_PALLETTE is disabled the callout box  
doesn’t appear.

The mouse event is called correctly (so clicking displays “CALL\_OUT\_BOX” in the console).  
Is there something making the Call Out Boxes not displayed when the editor palette is disabled or something happening when it is enabled that makes the call out box working correctly that I would needed to do also on my side to ensure it works when it is disabled?

---

<div class="post-metadata">

### Author: ![daniel](https://forum.foleysfinest.com/user_avatar/forum.foleysfinest.com/daniel/32/5_2.png) [@daniel](https://forum.foleysfinest.com/u/daniel)
#### Post date: [20 November 2023 20:37 UTC](https://forum.foleysfinest.com/t/calloutbox-not-displayed-if-the-editor-palette-is-disabled/177/2 "2023-11-20T20:37:25Z")

</div>

Oh wow, I am babboozled.  
There is nothing intentional about that, and I have no idea what could have made it work in connection with the editor.

I would have to debug into it, sorry for not being more helpful. Let me know what you find, I am happy to help finding a fix.

---

<div class="post-metadata">

### Author: ![rafzael](https://forum.foleysfinest.com/letter_avatar_proxy/v4/letter/r/aeb1de/32.png) [@rafzael](https://forum.foleysfinest.com/u/rafzael)
#### Post date: [21 November 2023 08:29 UTC](https://forum.foleysfinest.com/t/calloutbox-not-displayed-if-the-editor-palette-is-disabled/177/3 "2023-11-21T08:29:10Z")

</div>

Ok I just found the solution, it seems it comes from the JUCE\_VERSION condition. By using the instructions corresponding to my juce version and then not use that ‘if’ condition the callout box appears correctly. I wonder why that work when the editor is opened since JUCE\_VERSION is define in the juce\_StandardHeader (so I don’t understand exactly what is happening)… but at least I get a solution 🙂
