# PopupMenu - function request

**URL:** <https://forum.juce.com/t/popupmenu-function-request/4106>\
**Category:** General JUCE discussion\
**Created:** [July 18, 2009, 1:04pm UTC](https://forum.juce.com/t/popupmenu-function-request/4106 "2009-07-18T13:04:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_Nkey](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/_nkey/32/399_2.png) [@\_Nkey](https://forum.juce.com/u/_Nkey)\
**Post date:** [July 18, 2009, 1:04pm UTC](https://forum.juce.com/t/popupmenu-function-request/4106/1 "2009-07-18T13:04:59Z")

</div>

Hello.

I am offen need to show PopupMenu at direct coordinates. I am add such code evey update.

Maybe it can be included in juce source tree?

Thanks.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [July 18, 2009, 3:30pm UTC](https://forum.juce.com/t/popupmenu-function-request/4106/2 "2009-07-18T15:30:58Z")

</div>

Well, maybe… How would you specify the position, though? You’d need to specify which corner of the menu you’re positioning, or maybe you’d want to specify the position of something in the menu… and it all gets a bit complicated.

---

<div class="post-metadata">

**Author:** ![\_Nkey](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/_nkey/32/399_2.png) [@\_Nkey](https://forum.juce.com/u/_Nkey)\
**Post date:** [July 19, 2009, 12:07pm UTC](https://forum.juce.com/t/popupmenu-function-request/4106/3 "2009-07-19T12:07:25Z")

</div>

I am just specify top left position and width of menu.  
I add parameter (showAtDirectPostion=false) in showAt function. After call it wil passed to internal funtions to ignore calcing of best(in some cases - not so best) position.

I have not juce code right here. I can send you changed PopupMenu.cpp tommorow, if you want.

Michail.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [July 19, 2009, 12:20pm UTC](https://forum.juce.com/t/popupmenu-function-request/4106/4 "2009-07-19T12:20:34Z")

</div>

That might work fine for what you’re doing, but to add a function like this I’d have to make it quite general, and very often I’m sure you’d want to specify things like the bottom-left corner, or not specify the width, etc… it just seems like it’d become a very convoluted method.

---

<div class="post-metadata">

**Author:** ![\_Nkey](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/_nkey/32/399_2.png) [@\_Nkey](https://forum.juce.com/u/_Nkey)\
**Post date:** [July 20, 2009, 12:03pm UTC](https://forum.juce.com/t/popupmenu-function-request/4106/5 "2009-07-20T12:03:34Z")

</div>

Hm… I am not sure.  
We need only one argument - can showAt recalc position or not. So, one new argument with default value - this is not compilant.

But, looks good to add position calculating in LookAndFeel. I think it is best solution for this problem.

Michail.
