# Right click event on tree component?

**URL:** <https://forum.inductiveautomation.com/t/right-click-event-on-tree-component/90014>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 7, 2024, 12:07pm UTC](https://forum.inductiveautomation.com/t/right-click-event-on-tree-component/90014 "2024-05-07T12:07:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dharani\_T](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@Dharani\_T](https://forum.inductiveautomation.com/u/Dharani_T)\
**Post date:** [May 7, 2024, 12:07pm UTC](https://forum.inductiveautomation.com/t/right-click-event-on-tree-component/90014/1 "2024-05-07T12:07:41Z")

</div>

Hi,

I have a tree component, on right click, i would like open a pop up. Currently i have done it by double click. Is there any chance to do for right click?

---

<div class="post-metadata">

**Author:** ![Ujwal\_Wankhede](https://avatars.discourse-cdn.com/v4/letter/u/4af34b/32.png) [@Ujwal\_Wankhede](https://forum.inductiveautomation.com/u/Ujwal_Wankhede)\
**Post date:** [May 7, 2024, 12:16pm UTC](https://forum.inductiveautomation.com/t/right-click-event-on-tree-component/90014/2 "2024-05-07T12:16:12Z")

</div>

You can use contextMenu  
[https://docs.inductiveautomation.com/docs/8.1/ignition-modules/perspective/working-with-perspective-components/perspective-component-properties#contextmenu](https://docs.inductiveautomation.com/docs/8.1/ignition-modules/perspective/working-with-perspective-components/perspective-component-properties#contextmenu)

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 7, 2024, 12:17pm UTC](https://forum.inductiveautomation.com/t/right-click-event-on-tree-component/90014/3 "2024-05-07T12:17:49Z")

</div>

The easiest way is to add an item to the context menu.  
`props.META.contextMenu.enabled : true`  
`props.META.contextMenu.items : etc.`

> **[Perspective Component Properties | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/ignition-modules/perspective/working-with-perspective-components/perspective-component-properties#contextmenu)**
>
> Each Perspective component has a unique set of properties that can be set and modified within the Perspective Property Editor. A component property is simply a named variable with a distinct type that affects something about the component's behavior...

@Ujwal_Wankhede: SNAP!

---

<div class="post-metadata">

**Author:** ![Dharani\_T](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@Dharani\_T](https://forum.inductiveautomation.com/u/Dharani_T)\
**Post date:** [May 8, 2024, 7:00am UTC](https://forum.inductiveautomation.com/t/right-click-event-on-tree-component/90014/4 "2024-05-08T07:00:49Z")

</div>

But how to open a popup on right click?

---

<div class="post-metadata">

**Author:** ![Dharani\_T](https://avatars.discourse-cdn.com/v4/letter/d/bc8723/32.png) [@Dharani\_T](https://forum.inductiveautomation.com/u/Dharani_T)\
**Post date:** [May 8, 2024, 7:19am UTC](https://forum.inductiveautomation.com/t/right-click-event-on-tree-component/90014/5 "2024-05-08T07:19:00Z")

</div>

Hey thanks for the headsup.  
I tried using context menu and message handler, it worked as expected.
