# Jython: Setting up a Popup Menu dynamically

**URL:** <https://forum.inductiveautomation.com/t/jython-setting-up-a-popup-menu-dynamically/6318>\
**Category:** Ignition\
**Created:** [April 24, 2013, 7:40pm UTC](https://forum.inductiveautomation.com/t/jython-setting-up-a-popup-menu-dynamically/6318 "2013-04-24T19:40:57Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 24, 2013, 11:07pm UTC](https://forum.inductiveautomation.com/t/jython-setting-up-a-popup-menu-dynamically/6318/5 "2013-04-24T23:07:50Z")

</div>

Well, I know this doesn’t exactly help you now, but in 7.6 you’ll be able to do something like this:

```auto
from functools import partial

def f1(event):
	print 'f1(event=%s)' % str(event)
	
def f2(event):
	print 'f2(event=%s)' % str(event)

def f3(event, param):
	print 'f3(event=%s, param=%s)' % (str(event), str(param))
	 
	 
f3_partial = partial(f3, param='some value')

menu = system.gui.createPopupMenu({
	'item1' : f1, 
	'item2' : f2, 
	'item3' : f3_partial})
	
menu.show(event)
```

This is valid Jython code in 7.5 as well, but because of some internal scripting details it won’t work for this particular case.

---

_[View the full topic](https://forum.inductiveautomation.com/t/jython-setting-up-a-popup-menu-dynamically/6318)._
