Binding Chart mode selection to buttons

Is there a way to bind the right mouse click menu items to components such as buttons making it easier to select modes and possibly making way for pre-defined combination actions?



See fpmi.gui.createPopupMenu. If you already knew about that, then I’m afraid I didn’t understand the question.

Hope this helps,


I must have been unclear in my question. The other possibility is of course that I do not understand what fpmi.gui.createPopupMenu does.

In runtime there is a menu on the Chart component that can be brought up by right-clicking on the Chart. This menu contains, among other things, mode selections such as Zoom, Pan, Mark, X-Trace and other functions such as Print and Save. My question is: Can I bind these to buttons so that the user can, as an example, switch between Zoom and X-Trace modes by clicking on buttons instead of right-clicking and using the menu?

Sorry for not being clear. I hope this is understandable!



Ah, now I understand! And the answer is: not in the version that you have.

In the next version of FPMI the chart will expose a function called setMode() that lets you programmatically set the mode of the chart.