Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2014

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

Search the Archive

PasteButton and SelectionPlaceHolder

  • To: mathgroup at smc.vnet.net
  • Subject: [mg132339] PasteButton and SelectionPlaceHolder
  • From: Fred Simons <f.h.simons at tue.nl>
  • Date: Wed, 12 Feb 2014 05:14:11 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net

Here are two questions on PasteButton. The example is a strong 
simplification of something that I did not get working.

Construct a PasteButton by evaluating the next command.

PasteButton[\[SelectionPlaceholder]^2 + \[SelectionPlaceholder]^3]

Then enter the number 4 in an Input Cell. select it and press the 
button. The result is

4^2 + \[SelectionPlaceholder]^3

where the selectionplaceholder first turns up as an open square, that 
becomes black as soon as we click in the cell.

Question 1. Only the first selectionplaceholder is used. Is this 
intented behaviour? Is it possible to replace all selectionplaceholders 
with the selection?

Question 2. There is no evaluation. Is it possible to construct a 
PasteButton that also evaluates the result?

Any help will highly be appreciated.

Many thanks in advance.

Fred Simons
Eindhoven University of Technology



  • Prev by Date: Re: R: Re: Goodstein expansion
  • Next by Date: Constrained Locators
  • Previous by thread: Re: R: Re: Goodstein expansion
  • Next by thread: Constrained Locators