Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5970367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:21:53+00:00 2026-05-22T20:21:53+00:00

When graphics are right-clicked in Mathematica you get a context menu (cut graphics, copy

  • 0

When graphics are right-clicked in Mathematica you get a context menu (cut graphics, copy graphics, save graphics as,…), but for a LocatorPane Graphic this right click menu is disable.
How can I call a context menu for a LocatorPane graphics with an EventHandler or a MouseAction command in Mathematica? What command creates this menu?

LocatorPane[{1, 1}/2, Graphics[{Gray, Disk[]}]]

I find this code to open “Save as” Window in mathematica.

FrontEndExecute[FrontEndToken["SelectionSaveSpecial"]]

I want when i right click a LocatorPane graphic the “Save As” window open.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:21:54+00:00Added an answer on May 22, 2026 at 8:21 pm

    You said:

    I want to call “save graphic as” by right click on LocatorPane graphics.

    I have not yet found a way to do that, but you may not know that you can:

    1. select the LocatorPane object by clicking in the white-space to the right of it and dragging left.

    2. use menu File > Save Selection As... to save a graphic in your desired format.


    What I believe is the correct option does not appear to work:

    SetOptions[EvaluationNotebook[], 
      ComponentwiseContextMenu -> {"GraphicsBox" -> 
         FEPrivate`FrontEndResource["ContextMenus", "GraphicsBox"], 
        "Graphics3DBox" -> 
         FEPrivate`FrontEndResource["ContextMenus", "Graphics3DBox"], 
        "LocatorPaneBox" -> 
         FEPrivate`FrontEndResource["ContextMenus", "GraphicsBox"], 
        "CellGroup" -> 
         FEPrivate`FrontEndResource["ContextMenus", "CellGroup"], 
        "CellBracket" -> 
         FEPrivate`FrontEndResource["ContextMenus", "CellBracket"], 
        "CellRange" -> 
         FEPrivate`FrontEndResource["ContextMenus", "CellRange"], 
        "CellInsertionPoint" -> 
         FEPrivate`FrontEndResource["ContextMenus", "CellInsertionPoint"]}
      ];
    

    Specifically, the value for "LocatorPaneBox" -> was changed to "GraphicsBox" but it has no apparent effect.

    On the other hand, changing the value for "GraphicsBox" -> does have an effect.

    I suspect that because LocatorPane uses the mouse input, it captures the right-click attempt, and never passes it to the context menu mechanism. Perhaps disabling the mouse as an input device for LocatorPane would correct this, but that does not seem practical.


    Here is one way to implement your suggestion of using "SelectionSaveSpecial":

    Dynamic[EventHandler[
      LocatorPane[{1, 1}/2, Graphics[{Gray, Disk[]}]],
      {"MouseClicked", 2} :> 
       FrontEndExecute[
         SelectionMove[EvaluationNotebook[], All, GeneratedCell];
         SelectionMove[EvaluationNotebook[], All, CellContents]; 
         FrontEndToken["SelectionSaveSpecial"]
       ]
    ]]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to paint Graphics on JPanel. Right now, what I am doing is,
I created this awesome search field for my graphics. And use css sprite to
I need to create a sprite graphic, I hope that's the right name for
I'm writing a JApplet right now, and whenever I call super.paint(), the applet flickers.
I am caching some graphics onto CGLayers and then storing them in NSValue objects
I'm trying to make a presentation on ggplot2 graphics using beamer + sweave. Some
I have a pretty simple game that is out on the Market right now.
i have been trying to make a bouncing ball animation.I have got everything right
Can someone help point me in the direction of changing multiple inline styles using
So my kids and I are playing around with making some web-based games and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.