PasteButton
PasteButton[expr]
represents a button that pastes expr whenever it is pressed.
PasteButton[label,expr]
displays with label on the button.
Details and Options

- expr is by default pasted at the current insertion point in your input notebook.
- PasteButton[notebook,label,expr] pastes to the specified notebook.
- PasteButton evaluates its arguments in an ordinary way, so that expr is immediately evaluated.
- PasteButton[Defer[expr]] creates a button which pastes the unevaluated form of expr.
- If expr contains a selection placeholder, it will be replaced by your current selection when the paste is done.
- Selection placeholders are represented by the character or \[SelectionPlaceholder].
- label can be any expression.
- PasteButton takes the same options as Button.
- PasteButton[expr] creates a button with equivalent functionality to the one created by Button[expr,None,BaseStyle->"Paste"].
-
Alignment Automatic how to align contents within the button Appearance Automatic the overall appearance of the button AutoAction False whether to click the button automatically when the mouse is over it Background Automatic button background color BaselinePosition Automatic alignment relative to surrounding text BaseStyle "GenericButton" base style specifications for the button ContentPadding True whether to shrink the margins tightly around the contents Enabled Automatic whether the button is enabled or grayed out Evaluator Automatic the kernel in which to evaluate expr FrameMargins Automatic minimum margins to leave inside the frame ImageMargins 0 margins around the image of the displayed button ImageSize Full the overall image size of the displayed button Method "Preemptive" the evaluation method to use Tooltip None the tooltip for the button TooltipDelay 0.` how long to delay before displaying the tooltip TooltipStyle {} style specifications for the tooltip
List of all options

Examples
open allclose allBasic Examples (3)
Scope (2)
Options (13)
Appearance (1)
Default and "Pressed" appearance:
Enabled (2)
By default PasteButton is enabled:
By setting Enabled->False, the button is disabled but visible in its current state:
FrameMargins (1)
By setting FrameMargins you make the button content area larger:
ImageMargins (1)
By setting ImageMargins you make the button area larger:
Properties & Relations (2)
Possible Issues (1)
PasteButton does not evaluate its arguments on each click:
Text
Wolfram Research (2007), PasteButton, Wolfram Language function, https://reference.wolfram.com/language/ref/PasteButton.html.
CMS
Wolfram Language. 2007. "PasteButton." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PasteButton.html.
APA
Wolfram Language. (2007). PasteButton. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PasteButton.html