# Binding Chart mode selection to buttons

**URL:** <https://forum.inductiveautomation.com/t/binding-chart-mode-selection-to-buttons/192>\
**Category:** Archived Topics\
**Created:** [February 8, 2007, 7:07pm UTC](https://forum.inductiveautomation.com/t/binding-chart-mode-selection-to-buttons/192 "2007-02-08T19:07:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![torulf](https://avatars.discourse-cdn.com/v4/letter/t/898d66/32.png) [@torulf](https://forum.inductiveautomation.com/u/torulf)\
**Post date:** [February 8, 2007, 7:07pm UTC](https://forum.inductiveautomation.com/t/binding-chart-mode-selection-to-buttons/192/1 "2007-02-08T19:07:23Z")

</div>

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?

Regards

/T

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [February 8, 2007, 11:06pm UTC](https://forum.inductiveautomation.com/t/binding-chart-mode-selection-to-buttons/192/2 "2007-02-08T23:06:34Z")

</div>

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

Hope this helps,

---

<div class="post-metadata">

**Author:** ![torulf](https://avatars.discourse-cdn.com/v4/letter/t/898d66/32.png) [@torulf](https://forum.inductiveautomation.com/u/torulf)\
**Post date:** [February 9, 2007, 12:12pm UTC](https://forum.inductiveautomation.com/t/binding-chart-mode-selection-to-buttons/192/3 "2007-02-09T12:12:55Z")

</div>

Sorry,

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!

Regards

/T

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [February 9, 2007, 2:34pm UTC](https://forum.inductiveautomation.com/t/binding-chart-mode-selection-to-buttons/192/4 "2007-02-09T14:34:27Z")

</div>

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.
