PasteButton
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"].
List of all options
Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Scope (2)Survey of the scope of standard use cases
PasteButton Content (1)
Options (13)Common values & functionality for each option
Alignment (1)
Appearance (1)
Background (1)
BaselinePosition (1)
Enabled (2)
By default PasteButton is enabled:
https://wolfram.com/xid/09bpxe24i-buon3j
By setting Enabled->False, the button is disabled but visible in its current state:
https://wolfram.com/xid/09bpxe24i-d1mv62
Evaluator (1)
FrameMargins (1)
By setting FrameMargins you make the button content area larger:
https://wolfram.com/xid/09bpxe24i-80fq53
ImageMargins (1)
By setting ImageMargins you make the button area larger:
https://wolfram.com/xid/09bpxe24i-ocu3w
ImageSize (4)
https://wolfram.com/xid/09bpxe24i-d5tfpi
https://wolfram.com/xid/09bpxe24i-e2do6g
By setting the second element you can also control the height:
https://wolfram.com/xid/09bpxe24i-kxe9rk
https://wolfram.com/xid/09bpxe24i-gtz2io
Applications (1)Sample problems that can be solved with this function
Properties & Relations (2)Properties of the function, and connections to other functions
Use to replace it with the current selection:
https://wolfram.com/xid/09bpxe24i-j13hko
PasteButton is a special case of Button:
https://wolfram.com/xid/09bpxe24i-e1uz1y
https://wolfram.com/xid/09bpxe24i-g70c2
Possible Issues (1)Common pitfalls and unexpected behavior
PasteButton does not evaluate its arguments on each click:
https://wolfram.com/xid/09bpxe24i-esg3uh
Wolfram Research (2007), PasteButton, Wolfram Language function, https://reference.wolfram.com/language/ref/PasteButton.html.
Text
Wolfram Research (2007), PasteButton, Wolfram Language function, https://reference.wolfram.com/language/ref/PasteButton.html.
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.
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
Wolfram Language. (2007). PasteButton. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PasteButton.html
BibTeX
@misc{reference.wolfram_2024_pastebutton, author="Wolfram Research", title="{PasteButton}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/PasteButton.html}", note=[Accessed: 11-January-2025
]}
BibLaTeX
@online{reference.wolfram_2024_pastebutton, organization={Wolfram Research}, title={PasteButton}, year={2007}, url={https://reference.wolfram.com/language/ref/PasteButton.html}, note=[Accessed: 11-January-2025
]}