Mathematica > Notebooks and Documents > Low-Level Notebook Programming > NotebookSelection >

NotebookSelection

NotebookSelection
represents the current selection in the current evaluation notebook in the front end.
NotebookSelection[nb]
represents the current selection associated with the open notebook nb.
  • You can use Options and SetOptions to read and write options associated with your current selection.
Select some text and then set a font option for it:
Find out the option settings for the selected text:
Select some text and then set a font option for it:
In[1]:=
Click for copyable input
Find out the option settings for the selected text:
In[4]:=
Click for copyable input
Out[4]=
Apply a named style to a selection:
Set an option for selected graphics:
You do not need to use NotebookSelection with most notebook-manipulating functions:
Some options are not applicable to individual cells or cell contents:
New in 3
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF