PRODUCTS
Products Overview
Mathematica
Mathematica Student Edition
Mathematica Home Edition
Wolfram
CDF Player
(free download)
Computable Document Format (CDF)
web
Mathematica
grid
Mathematica
Wolfram
Workbench
Wolfram
SystemModeler
Wolfram
Finance Platform
Mathematica
Add-Ons
Wolfram|Alpha Products
SOLUTIONS
Solutions Overview
Engineering
Aerospace Engineering & Defense
Chemical Engineering
Control Systems
Electrical Engineering
Image Processing
Industrial Engineering
Materials Science
Mechanical Engineering
Operations Research
Optics
Petroleum Engineering
Biotechnology & Medicine
Bioinformatics
Medical Imaging
Finance, Statistics & Business Analysis
Actuarial Sciences
Data Analysis & Mining
Econometrics
Economics
Financial Engineering & Mathematics
Financial Risk Management
Statistics
Software Engineering & Content Delivery
Authoring & Publishing
Interface Development
Software Engineering
Web Development
Science
Astronomy
Biological Sciences
Chemistry
Environmental Sciences
Geosciences
Social & Behavioral Sciences
Design, Arts & Entertainment
Game Design, Special Effects & Generative Art
Education
STEM Education Initiative
Higher Education
Community & Technical College Education
Primary & Secondary Education
Students
Technology
Computable Document Format (CDF)
High-Performance & Parallel Computing (HPC)
See Also: Technology Guide
PURCHASE
Online Store
Other Ways to Buy
Volume & Site Licensing
Contact Sales
Software
Service
Upgrades
Training
Books
Merchandise
SUPPORT
Support Overview
Mathematica
Documentation
Knowledge Base
Learning Center
Technical Services
Community & Forums
Training
Does My Site Have a License?
Wolfram User Portal
COMPANY
About Wolfram Research
News
Events
Wolfram Blog
Partnerships
Employment Opportunities
History of
Mathematica
Stephen Wolfram's Home Page
Contact Us
OUR SITES
All Sites
Wolfram|Alpha
Demonstrations Project
MathWorld
Integrator
Wolfram Functions Site
Mathematica Journal
Wolfram Media
Wolfram
Tones
Wolfram Science
Stephen Wolfram
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE
DOCUMENTATION CENTER
FOR THE LATEST INFORMATION.
DOCUMENTATION CENTER SEARCH
New to
Mathematica
?
Find your learning path
»
Mathematica
>
Dynamic Interactivity
>
Control Objects
>
PasteButton
>
BUILT-IN MATHEMATICA SYMBOL
Introduction to Dynamic
Generalized Input
Tutorials »
|
Button
Paste
NotebookApply
Hyperlink
Defer
RawBoxes
See Also »
|
Clipboard Operations
Control Objects
Custom Interface Construction
Palettes
More About »
PasteButton
PasteButton
[
expr
]
represents a button that pastes
expr
whenever it is pressed.
PasteButton
displays with
label
on the button.
MORE INFORMATION
expr
is by default pasted at the current insertion point in your input notebook.
PasteButton
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"]
.
EXAMPLES
CLOSE ALL
Basic Examples
(3)
Create a button that will paste its contents:
Supply a different label:
Create a button to paste an unevaluated expression:
Create a button that will paste its contents:
In[1]:=
Out[1]=
Supply a different label:
In[1]:=
Out[1]=
Create a button to paste an unevaluated expression:
In[1]:=
Out[1]=
Scope
(2)
Use any expression as a label:
Paste the result of an evaluation:
Paste a graphics object:
Options
(13)
Different predefined alignment options:
Default
and
appearance:
Change the background colors:
Align with the surrounding text:
By default
PasteButton
is enabled:
By setting
Enabled
->
False
, the button is disabled but visible in its current state:
By default the paste operation takes place in the front end:
By setting
FrameMargins
you make the button content area larger:
By setting
ImageMargins
you make the button area larger:
Use preset values:
Or use any values:
By setting the second element you can also control the height:
Set a fully custom size:
Applications
(1)
Make paste buttons for a collection of country strings:
Properties & Relations
(2)
Use
to replace it with the current selection:
PasteButton
is a special case of
Button
:
Possible Issues
(1)
PasteButton
does not evaluate its arguments on each click:
SEE ALSO
Button
Paste
NotebookApply
Hyperlink
Defer
RawBoxes
TUTORIALS
Introduction to Dynamic
Generalized Input
MORE ABOUT
Clipboard Operations
Control Objects
Custom Interface Construction
Palettes
New in 6