# Context Menu on Cytoscape

**URL:** <https://community.plotly.com/t/context-menu-on-cytoscape/78171>\
**Category:** Dash Python\
**Tags:** question\
**Created:** [August 30, 2023, 6:39pm UTC](https://community.plotly.com/t/context-menu-on-cytoscape/78171 "2023-08-30T18:39:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![slooshwoosh](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@slooshwoosh](https://community.plotly.com/u/slooshwoosh)\
**Post date:** [August 30, 2023, 6:39pm UTC](https://community.plotly.com/t/context-menu-on-cytoscape/78171/1 "2023-08-30T18:39:32Z")

</div>

Sorry for reviving this thread a little. But I am struggling to follow your outline here for getting a working context menu to appear on a right click. Do you know where I might find an example of a context menu being used (for example, I am trying to get a context menu to appear in a cytoscape component, and, as a working example for my own knowledge, change the color of a node from one of a few options from the menu. But I am struggling to even get the position of the right-click event to be stored properly…)?

---

<div class="post-metadata">

**Author:** ![jinnyzor](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jinnyzor/32/21194_2.png) [@jinnyzor](https://community.plotly.com/u/jinnyzor)\
**Post date:** [August 30, 2023, 7:49pm UTC](https://community.plotly.com/t/context-menu-on-cytoscape/78171/2 "2023-08-30T19:49:30Z")

</div>

Hello @slooshwoosh,

Welcome to the community!

Could you please post an example of what you are trying to do?

> [@How to Get your Questions Answered on the Plotly Forum](https://community.plotly.com/t/how-to-get-your-questions-answered-on-the-plotly-forum/40551):
>
> Your Plotly community members answer a great majority of the questions posted on the forum. However, responders’ time is limited. To greatly increase your chances of getting your post answered, your questions need to be easy to read and easy to reply to . This post will illustrate exactly how to do that. TL;DR: jump to section WHILE POSTING. BEFORE POSTING: Often, strange or problematic behaviour has been fixed in the most recent version of dash or of plotly so always ensure you’re using th…

---

<div class="post-metadata">

**Author:** ![slooshwoosh](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@slooshwoosh](https://community.plotly.com/u/slooshwoosh)\
**Post date:** [September 23, 2023, 4:29pm UTC](https://community.plotly.com/t/context-menu-on-cytoscape/78171/4 "2023-09-23T16:29:50Z")

</div>

Thanks for the response! What I am trying to do is understand how I might add a right-click context-menu to to a Cytoscape component in a way that let’s me to use python functions as callbacks for the context-menu options. Really, I am hoping for an (ideally) working example of how to accomplish this. So, as an self-educational task I have been trying to add a context menu to a simple network graph that would allow me to, say, change the color of a node based on the selected option in the context-menu. But I haven’t had any luck. And was hoping someone could point me towards an example that utilizes a right-click context menu in a cytoscape component. Is such a thing possible?
