PopupMenu::showAt()


#1

I would like to use the showAt() method to show a popup that’s aligned with a Rectangle, just as I would do with a Component, that unfortunately I don’t have in this case. Looking at the code, it seems that it would be easy to add the following code to the PopupMenu class.

int PopupMenu::showAt (const Rectangle<int> screenRect, const int itemIdThatMustBeVisible, const int minimumWidth, const int maximumNumColumns, const int standardItemHeight, ModalComponentManager::Callback* callback) { return showMenu (screenRect, itemIdThatMustBeVisible, minimumWidth, maximumNumColumns, standardItemHeight, true, 0, callback); }
Thanks
Amedeo


#2

Good request. In fact, the current version of showAt that takes a coordinate should probably take a rectangle instead.