3

I want to know if it is possible create a pop-up menu with right click in a web page using R-Shiny, and how create menu with submenus?

I was testing with this code but does not work:

selectInput("variable", "Variable:",
        c(selectInput("variable1",Cylinders",c("cyl"="pm,"mmm"="jj"),
          "Transmission" = "am",
          "Gears" = "gear"))
zx8754
  • 52,746
  • 12
  • 114
  • 209
narteaga
  • 147
  • 2
  • 12

1 Answers1

4

I have a package called shinyBS that adds many twitter bootstrap components to the shiny interface.

I've been working on an update that adds new menu-creating functions, one of which is to create right-click context menus in shiny apps. The update isn't ready for release yet but if you want to see where it stands you can install the 'menu-integration' branch of shinyBS from github:

devtools::install_github("shinyBS", "ebailey78", "menu-integration")

once installed, you can see the demo I've been working on by running:

shinyBS::bsDemo("menubar")

Right-click the plot to see the context menu in action... I would love any feedback you have!

zx8754
  • 52,746
  • 12
  • 114
  • 209
Eric
  • 962
  • 8
  • 12
  • Thank you!!, it's just what i was looking for, i am going to test your package, for create this menus in my GUI :)... I will comment you anything – narteaga Jul 22 '14 at 21:05
  • do you know if is possible change of display without using tabs but using the popup menu for change different displays? – narteaga Aug 01 '14 at 18:38
  • @Eric do you know if there is a way to restrict the native right click behavior. There are two menus which pop up for me when i right click: the native mac right click and the applications right click. – chaitanya.varanasi Oct 03 '14 at 18:19