Problems with custom modal component


Hi everyone,

I am trying to make a simple modal custom component which inherits from Component in a VST plugin. When trying to show it, I called the function enterModalState (false, 0) and it didn’t do anything. When debugging inside the library code and compared with a PopUpMenu, I realised that the flag hasHeavyweightPeerFlag is false while in the popUpMenu is true. (Function getPeers() returns null pointer and Component::isShowing() always returns false). That’s the reason (or maybe there are other reasons) why it didn’t enter in modal state. I think I forgot something when creating custom component.






not a specific help, but i think its betters to avoid modal components in plugins at all…

If you need something popup-like, use a PopupMenu with a custom component…


Thanks for the answer. However we (Oscar is my partner) need to do a custom popupmenu, since default juce popup menu doesn’t allow using transparent colours and doesn’t allow to round the corners overwritting its LookAndFeel functions. Take a look to this image and you will see those undersired white corners with default juce PopupMenu (and the cannot be transparents)

Any help will be highly appreciated.