# Scroll through PopupMenu entries?

**URL:** <https://forum.xojo.com/t/scroll-through-popupmenu-entries/23269>\
**Category:** macOS\
**Created:** [March 27, 2015, 6:29pm UTC](https://forum.xojo.com/t/scroll-through-popupmenu-entries/23269 "2015-03-27T18:29:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard\_Summers](https://forum.xojo.com/user_avatar/forum.xojo.com/richard_summers/32/477_2.png) [@Richard\_Summers](https://forum.xojo.com/u/Richard_Summers)\
**Post date:** [March 27, 2015, 6:29pm UTC](https://forum.xojo.com/t/scroll-through-popupmenu-entries/23269/1 "2015-03-27T18:29:10Z")

</div>

Hi,  
I have a PopupMenu with 10 or so entries. Is it possible to be able to scroll up and down the entries via the up and down arrow keys?  
I thought this was automatically possible via the OS, but this seems not to be the case.

Did I imagine this? If so, what is the best way to achieve this?

Thank you all in advance.

---

<div class="post-metadata">

**Author:** ![Eli\_Ott](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/5f8ce5/32.png) [@Eli\_Ott](https://forum.xojo.com/u/Eli_Ott)\
**Post date:** [March 27, 2015, 7:27pm UTC](https://forum.xojo.com/t/scroll-through-popupmenu-entries/23269/2 "2015-03-27T19:27:24Z")

</div>

> [@176926:@Richard Summers](#):
>
> Is it possible to be able to scroll up and down the entries via the up and down arrow keys?

Never seen that this would not work. Do you have code in the KeyDown event preventing the built-in behavior?

---

<div class="post-metadata">

**Author:** ![Michel\_Bujardet](https://forum.xojo.com/user_avatar/forum.xojo.com/michel_bujardet/32/252_2.png) [@Michel\_Bujardet](https://forum.xojo.com/u/Michel_Bujardet)\
**Post date:** [March 27, 2015, 7:31pm UTC](https://forum.xojo.com/t/scroll-through-popupmenu-entries/23269/3 "2015-03-27T19:31:34Z")

</div>

[quote=176926:@Richard Summers]Hi,  
I have a PopupMenu with 10 or so entries. Is it possible to be able to scroll up and down the entries via the up and down arrow keys?  
I thought this was automatically possible via the OS, but this seems not to be the case.

Did I imagine this? If so, what is the best way to achieve this?

Thank you all in advance.[/quote]

From what I see it works fine on Mac when the menu is low enough on the screen to be shorter than the list. But the amazing thing is the whole list scrolls up, instead of the content.

If the list is longer than the screen height, then it seems to scroll the content.

---

<div class="post-metadata">

**Author:** ![Stefan\_Cyrus](https://forum.xojo.com/letter_avatar_proxy/v4/letter/s/edb3f5/32.png) [@Stefan\_Cyrus](https://forum.xojo.com/u/Stefan_Cyrus)\
**Post date:** [March 27, 2015, 7:46pm UTC](https://forum.xojo.com/t/scroll-through-popupmenu-entries/23269/4 "2015-03-27T19:46:46Z")

</div>

I do this with:

Windows KeyDown Event:

If Keyboard.AsyncKeyDown(126) then // UP  
self.PM.ListIndex = self.PM.ListIndex - 1  
end if

If Keyboard.AsyncKeyDown(125) then // DOWN  
self.PM.ListIndex = self.PM.ListIndex - 1  
end if

---

<div class="post-metadata">

**Author:** ![Richard\_Summers](https://forum.xojo.com/user_avatar/forum.xojo.com/richard_summers/32/477_2.png) [@Richard\_Summers](https://forum.xojo.com/u/Richard_Summers)\
**Post date:** [March 27, 2015, 8:12pm UTC](https://forum.xojo.com/t/scroll-through-popupmenu-entries/23269/5 "2015-03-27T20:12:06Z")

</div>

Thanks guys - I think I need to sort out code I have in the window key up event 🙂

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 5:42pm UTC](https://forum.xojo.com/t/scroll-through-popupmenu-entries/23269/6 "2020-10-29T17:42:18Z")

</div>


