MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: RE: : 6.0 Get Graphics Coordinates...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg78074] Re: [mg78046] RE: [mg77971]: 6.0 Get Graphics Coordinates...
  • From: Curtis Osterhoudt <cfo at lanl.gov>
  • Date: Fri, 22 Jun 2007 06:42:25 -0400 (EDT)
  • Organization: LANL
  • References: <f4on38$7sg$1@smc.vnet.net> <200706201019.GAA12842@smc.vnet.net> <200706211004.GAA27876@smc.vnet.net>
  • Reply-to: cfo at lanl.gov

On Thursday 21 June 2007 04:04:35 Ingolf Dahl wrote:
> CreatePalette[
>   Column[{Button["Add LocatorPane",
>      SelectionMove[InputNotebook[], All, CellContents];
>      NotebookWrite[
>       InputNotebook[], (DynamicModuleBox[{$CellContext`pts$$ = {{0.,
>               0.}}}, LocatorPaneBox[Dynamic[$CellContext`pts$$], #,
>            LocatorAutoCreate -> True], DynamicModuleValues :> {}]) &@
>        NotebookRead[InputNotebook[]]]],
>     "Use Alt+Click to add or delete locators!",
>     Button["Copy locator positions",
>      SelectionMove[InputNotebook[], All, Cell];
>      FrontEndExecute[FrontEndToken["Copy"]];
>      SelectionMove[InputNotebook[], All, CellContents];
>      Module[{b}, b = NotebookRead[InputNotebook[]];
>       If[And[Length[b] >= 3, MatchQ[b[[2]], _LocatorPaneBox]],
>        b = b[[1, 1]]; $LocatorPositions = b;
>        SelectionMove[ClipboardNotebook[], All, Notebook];
>        NotebookWrite[ClipboardNotebook[], ToBoxes[b],All];
>        SelectionMove[ClipboardNotebook[], All, Notebook]]]],
>     Button["Remove LocatorPane",
>      SelectionMove[InputNotebook[], All, CellContents];
>      Module[{b}, b = NotebookRead[InputNotebook[]];
>       If[And[Length[b] >= 3, MatchQ[b[[2]], _LocatorPaneBox]],
>        NotebookWrite[InputNotebook[], b[[2, 2]]]]]],
>     Dynamic[MousePosition["Graphics"]]}],
>   WindowTitle -> "Get Graphics Coordinates"];

Your locator code works really well for me, now. KDE users: you must use
ALT+CRTL+CLICK to place the locators!

==========================
==========================
========
Curtis Osterhoudt
cfo at remove_this.lanl.and_this.gov
PGP Key ID: 0x4DCA2A10
Please avoid sending me Word or PowerPoint attachments
See http://www.gnu.org/philosophy/no-word-attachments.html
==========================
==========================
========


  • Prev by Date: Re: Multiple UNDO - a simple proposal
  • Next by Date: Re: Same Limit in v5.2 and v6.0 - conclusion, I hope...
  • Previous by thread: RE: : 6.0 Get Graphics Coordinates...
  • Next by thread: Re: RE: Re: Re: 6.0 Get Graphics Coordinates...