# Scrollable Popup Menu

**URL:** <https://forum.inductiveautomation.com/t/scrollable-popup-menu/78793>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [September 5, 2023, 10:59pm UTC](https://forum.inductiveautomation.com/t/scrollable-popup-menu/78793 "2023-09-05T22:59:33Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![AIO](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aio/32/87549_2.png) [@AIO](https://forum.inductiveautomation.com/u/AIO)\
**Post date:** [September 5, 2023, 10:59pm UTC](https://forum.inductiveautomation.com/t/scrollable-popup-menu/78793/1 "2023-09-05T22:59:33Z")

</div>

Hi folks,

I'm working with the Inductive created [Ad Hoc trend](https://inductiveautomation.com/exchange/92/overview) from the exchange. Looking at the "Load" feature for loading saved charts, we see the following:

> **'Load' Button Script**
>
> ```auto
> database = ""
> hasCharts = 1
> try:
> chartCount = system.db.runPrepQuery("SELECT COUNT(*) FROM saved_graphs",[], database)
> except:
> hasCharts = 0
> 
> if not hasCharts or chartCount[0][0]<1:
> system.gui.messageBox("No saved graphs currently exist. Use adjacent save button to store current graph.")
> else:
> database = ""
> username = system.security.getUsername()	
> 	
> names = []
> funcs = []
> 	
> privateNames = []
> privateFuncs = []
> 	
> create = 0
> 	
> try:
> charts = system.db.runPrepQuery("SELECT id, title FROM saved_graphs WHERE username = ? ORDER BY title ASC", [username], database)
> for row in charts:
> cNames = ["Load", "Delete"]
> #this if-else seems redundant - ARH
> if event.source.parent.databaseType == 'ORACLE':
> rowId=row["ID"]
> else:
> rowId=row["id"]
> def load(event, id=rowId):
> import system
> info = system.db.runPrepQuery("SELECT title, tagpens, axes, chartmode, startdate, enddate, rangestartdate, rangeenddate, unit, unitcount FROM saved_graphs WHERE id = ?", [id], database)
> if len(info):
> chart = event.source.parent.getComponent('Easy Chart')
> chart.title = info[0][0]
> chart.tagPens = system.dataset.fromCSV(info[0][1])
> chart.axes = system.dataset.fromCSV(info[0][2])
> chart.updateMinMaxAvg()
> chart.chartMode = int(info[0][3])
> chart.startDate = info[0][4]
> chart.endDate = info[0][5]
> chart.outerRangeStart = info[0][6]
> chart.outerRangeEnd = info[0][7]
> chart.unit = int(info[0][8])
> chart.unitCount = int(info[0][9])
> def doLater():
> chart.chartMode = int(info[0][3])
> chart.startDate = info[0][4]
> chart.endDate = info[0][5]
> chart.outerRangeStart = info[0][6]
> chart.outerRangeEnd = info[0][7]
> chart.unit = int(info[0][8])
> chart.unitCount = int(info[0][9])
> system.util.invokeLater(doLater, 1000)
> if event.source.parent.databaseType == 'ORACLE':
> rowId=row["ID"]
> rowTitle=row["TITLE"]
> else:
> rowId=row["id"]
> rowTitle=row["title"]
> def delete(event, id=rowId, title=rowTitle):
> import system
> if system.gui.confirm("Are you sure you want to delete chart '%s'?" % title):
> system.db.runPrepUpdate("DELETE FROM saved_graphs WHERE id = ?", [id], database)
> cFuncs = [load, delete]
> privateNames.append(rowTitle)
> privateFuncs.append([cNames, cFuncs])	
> except:
> create = 1
> 	
> publicNames = []
> publicFuncs = []
> 	
> try:
> charts = system.db.runPrepQuery("SELECT id, title FROM saved_graphs WHERE username IS NULL ORDER BY title ASC", [], database)
> for row in charts:
> pubNames = ["Load", "Delete"]
> #this if-else seems redundant - ARH
> if event.source.parent.databaseType == 'ORACLE':
> rowId=row["ID"]
> else:
> rowId=row["id"]
> def load(event, id=rowId):
> import system
> info = system.db.runPrepQuery("SELECT title, tagpens, axes, chartmode, startdate, enddate, rangestartdate, rangeenddate, unit, unitcount FROM saved_graphs WHERE id = ?", [id], database)
> if len(info):
> chart = event.source.parent.getComponent('Easy Chart')
> chart.title = info[0][0]
> chart.tagPens = system.dataset.fromCSV(info[0][1])
> chart.axes = system.dataset.fromCSV(info[0][2])
> chart.updateMinMaxAvg()
> chart.chartMode = int(info[0][3])
> chart.startDate = info[0][4]
> chart.endDate = info[0][5]
> chart.outerRangeStart = info[0][6]
> chart.outerRangeEnd = info[0][7]
> chart.unit = int(info[0][8])
> chart.unitCount = int(info[0][9])
> def doLater():
> chart.chartMode = int(info[0][3])
> chart.startDate = info[0][4]
> chart.endDate = info[0][5]
> chart.outerRangeStart = info[0][6]
> chart.outerRangeEnd = info[0][7]
> chart.unit = int(info[0][8])
> chart.unitCount = int(info[0][9])
> system.util.invokeLater(doLater, 1000)
> if event.source.parent.databaseType == 'ORACLE':
> rowId=row["ID"]
> rowTitle=row["TITLE"]
> else:
> rowId=row["id"]
> rowTitle=row["title"]
> def delete(event, id=rowId, title=rowTitle):
> import system
> if system.gui.confirm("Are you sure you want to delete chart '%s'?" % title):
> system.db.runPrepUpdate("DELETE FROM saved_graphs WHERE id = ?", [id], database)
> pubFuncs = [load, delete]
> publicNames.append(rowTitle)
> publicFuncs.append([pubNames, pubFuncs])	
> except:
> create = 1
> 		
> names.append("Public")
> funcs.append([publicNames, publicFuncs])
> names.append(username)
> funcs.append([privateNames, privateFuncs])
> 	
> menu = system.gui.createPopupMenu(names, funcs)
> menu.show(event, 0, 28)
> 
> ```

This effectively creates a multi-level popup menu, with User / Public as the top tier, a list of saved charts as the second tier, and Load/Delete as the third tier.

The client has managed to create enough saved charts to fill the list (currently 45), and yet there is no scroll bar, so they cannot access components off screen. Reading [the other forum thread on this topic](https://forum.inductiveautomation.com/t/ign-5677-size-of-popupmenu/42068), it seems like scrollbars aren't supported for the built-in script, and we need to rework the script to use JidePopupMenu or JYPopupMenu, but I am at a bit of a loss for how to best transform the above for loops into something that will produce a working list.

I was hoping it would be a simple ask to provide basic function, but it seems like its more than I was expecting. Any advice on how to best approach this and what the core of that code would look like?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [September 5, 2023, 11:11pm UTC](https://forum.inductiveautomation.com/t/scrollable-popup-menu/78793/2 "2023-09-05T23:11:31Z")

</div>

What version of Ignition are you using? As of 8.1.25, `system.gui.createPopupMenu` automatically creates one that scrolls. There are a few minor issues with deeply nested menus/menus near the edge of the screen, resolved in 8.1.32, but the core functionality should be there.

---

<div class="post-metadata">

**Author:** ![AIO](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aio/32/87549_2.png) [@AIO](https://forum.inductiveautomation.com/u/AIO)\
**Post date:** [September 5, 2023, 11:12pm UTC](https://forum.inductiveautomation.com/t/scrollable-popup-menu/78793/3 "2023-09-05T23:12:58Z")

</div>

Go figure! The gateway in question is 8.1.24 🤦‍♂️

Sounds like another reason to get the minor revision updates scheduled if we can.

---

<div class="post-metadata">

**Author:** ![AIO](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aio/32/87549_2.png) [@AIO](https://forum.inductiveautomation.com/u/AIO)\
**Post date:** [September 19, 2023, 7:17pm UTC](https://forum.inductiveautomation.com/t/scrollable-popup-menu/78793/4 "2023-09-19T19:17:18Z")

</div>

I went ahead and ran the upgrade on a test bench (8.1.32), but I'm not seeing the scroll bar behavior. Is there some additional configuration we need to apply to the popup?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/5/5580d04ba7bd12669525fa37de83a26ee3e94439.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [September 19, 2023, 7:17pm UTC](https://forum.inductiveautomation.com/t/scrollable-popup-menu/78793/5 "2023-09-19T19:17:57Z")

</div>

The top level menu scrolls. Submenus don't. 🤦‍♂️

We've already got an internal ticket going for the fix.

---

<div class="post-metadata">

**Author:** ![AIO](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aio/32/87549_2.png) [@AIO](https://forum.inductiveautomation.com/u/AIO)\
**Post date:** [September 19, 2023, 7:18pm UTC](https://forum.inductiveautomation.com/t/scrollable-popup-menu/78793/6 "2023-09-19T19:18:20Z")

</div>

Ahh. Thank you for the clarification.

---

<div class="post-metadata">

**Author:** ![Urvish\_Mehta](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/urvish_mehta/32/81912_2.png) [@Urvish\_Mehta](https://forum.inductiveautomation.com/u/Urvish_Mehta)\
**Post date:** [March 11, 2024, 1:30pm UTC](https://forum.inductiveautomation.com/t/scrollable-popup-menu/78793/7 "2024-03-11T13:30:20Z")

</div>

Hello,

Somehow I don't get third tier options for LOAD / DELETE, Its always loads the trend. I am looking for an option to delete some trend to make this list shorter. I can do it from DB but would like to do it from runtime. Is there something I am missing?

---

<div class="post-metadata">

**Author:** ![Urvish\_Mehta](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/urvish_mehta/32/81912_2.png) [@Urvish\_Mehta](https://forum.inductiveautomation.com/u/Urvish_Mehta)\
**Post date:** [March 11, 2024, 1:33pm UTC](https://forum.inductiveautomation.com/t/scrollable-popup-menu/78793/8 "2024-03-11T13:33:01Z")

</div>

Actually My mistake, We don't get that option for Public trends.  
I hope we get solution for this soon. I am using 8.1.22 and I am not sure how I can add scroll bar or anybody solved it any other way?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 11, 2024, 3:08pm UTC](https://forum.inductiveautomation.com/t/scrollable-popup-menu/78793/9 "2024-03-11T15:08:01Z")

</div>

The fix is to update.

---

<div class="post-metadata">

**Author:** ![AIO](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/aio/32/87549_2.png) [@AIO](https://forum.inductiveautomation.com/u/AIO)\
**Post date:** [March 11, 2024, 9:03pm UTC](https://forum.inductiveautomation.com/t/scrollable-popup-menu/78793/10 "2024-03-11T21:03:24Z")

</div>

I pivoted from downtown menu to a pop-up window with a scrollable selection. Currently it makes more sense than upgrading for this client.

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [December 19, 2025, 2:47pm UTC](https://forum.inductiveautomation.com/t/scrollable-popup-menu/78793/11 "2025-12-19T14:47:28Z")

</div>

@paul-griffith I've got a customer that is seeing this on 8.1.45. Do you know what version the fix for the submenus was done?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 19, 2025, 4:28pm UTC](https://forum.inductiveautomation.com/t/scrollable-popup-menu/78793/12 "2025-12-19T16:28:09Z")

</div>

8.1.32 is when the fix for submenus happened; it's possible something broke. Can you tell support it's not working right?

---

<div class="post-metadata">

**Author:** ![bschroeder](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bschroeder/32/13260_2.png) [@bschroeder](https://forum.inductiveautomation.com/u/bschroeder)\
**Post date:** [December 19, 2025, 6:30pm UTC](https://forum.inductiveautomation.com/t/scrollable-popup-menu/78793/13 "2025-12-19T18:30:51Z")

</div>

Yep. I got with my customer and they are going to open a ticket with support.

---

<div class="post-metadata">

**Author:** ![Cody\_Doyle](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@Cody\_Doyle](https://forum.inductiveautomation.com/u/Cody_Doyle)\
**Post date:** [January 13, 2026, 12:36am UTC](https://forum.inductiveautomation.com/t/scrollable-popup-menu/78793/14 "2026-01-13T00:36:20Z")

</div>

For posterity, as there have been a few support tickets with the same issue here, the bug with Vision pop-ups not scrolling for submenus when sufficiently large is still present in 8.1 and did not seem to be fixed with the 8.1.32 update.

The first popup should scroll in versions 8.1.25 and above, however, so you can workaround the issue by having the popup menus open subsequent popups instead using [system.gui.createPopupMenu](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-gui/system-gui-createPopupMenu) calls.
