Hi,
I would like to disable the right click functionality for the status chart component in vision. I tried using below scripts,
1.
self.setPopupMenu(None)
self.setTransferHandler(None)
2.
from org.apache.commons.lang3.reflect import FieldUtils
chart = event.source.parent.getComponent(‘StatusChart_EfficiencyDay’)
FieldUtils.writeField(chart, “popupMenu”, None, True)
But did not executed as per the requirement.
Is there any other option to achieve this?
Thanks in advance
You can use the internalFrameActivated event of the window. Right click on the window name in the project tree
Your script would be something like:
chart = system.gui.getParentWindow(event).getComponentForPath('Root Container.Status Chart')
chart.setPopupMenu(None)
Hi,
I have used this chart in a template and i have added few instances of this to a window.
I have tried the given script in the template as well as the window and it is not working as expected.
Try this in the chart’s propertryChange event:
if event.propertyName == 'data':
event.source.setPopupMenu(None)
EDIT : Hold off on that a moment. I’m back in front of my PC.
EDIT2: Never mind on my never-mind. I just wanted to do a quick verification on the properties.