What showAsPopup() actually do?
-
I was playing with some features that I had no touching before, and I found this function. But after using it, I realized that it only adds a close-button in the corner (tested only inside HISE). I mean, actually you can drag a normal panel just setting
allowDragging
totrue
, so I don't get it at all. Anyways, maybe I don't finding the real functionallity (no info. found in the docs and the forum).Also, is it possible to set a custom lookAndFeel to the popup-close-button, because I'm using some panels that have a close button, so may I can replace them just to remove some extra elements from the interface-designer.
Thanks :)
-
@diablo99 If I remember correctly, that function displays the panel as a modal popup with the close button. There are not really any styling options for it. The most flexible option is to just use a regular panel and code the hide/show functionality yourself.
-
@diablo99 I tried using it but couldn't find a way to remove the closing X button, which then left my actual button in its on-state. It's far cleaner to set up a custom system with all your buttons in one array and your panels in another and then create a function containing (amongst other things)
panel.showControl(bool)
To show the active panel and hide the others. Obviously, if you wanted the option to have multiple panels open, you could code that.