I’m sure it’s something simple I’m doing wrong.
Here is the event handler tied to the mouse clicked event:
if event.button == event.BUTTON1:
app.breaker.operate(event)
else:
menu = app.breaker.getContextMenu()
menu.show(event)
and here is app.breaker.getContextMenu()
[code]def getContextMenu():
import system,app
open the breaker screen
def breaker(event):
import system,app
system.nav.openWindow(‘BreakerControl’, {‘Device’ :‘devicename’, ‘Site’ : ‘Southeast’})
system.nav.centerWindow(‘BreakerControl’)
Finally, create the actual popup menu and return it
contextMenu = system.gui.createPopupMenu([“Breaker”],[breaker])
return contextMenu[/code]