Wolfram Language & System 10.4 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)


moves the current selection in an open notebook in the front end in the direction dir by the specified unit.

repeats the move n times.

Details and OptionsDetails and Options

  • The first argument of SelectionMove can be a NotebookObject, CellObject, or BoxObject.
  • Possible direction specifications are:
  • Nextmake the selection be the next unit of the specified type
    Previousmake the selection be the previous unit of the specified type
    Aftermake the selection be just after the end of the present unit
    Beforemake the selection be just before the beginning of the present unit
    Allmake the selection be the whole of the present unit
  • Possible unit specifications are:
  • Characterindividual character
    Wordword or other token
    Expressioncomplete subexpression
    TextLineline of text
    GraphicsContentsthe contents of a graphics object
    Graphicscomplete graphics object
    CellContentsthe contents of a cell
    Cellcomplete cell
    CellGroupcell group
    GeneratedCellcell generated by the current evaluation
    Notebookcomplete notebook
  • Unless the option setting AutoScroll->False is given, the front end will scroll a notebook so that the result of SelectionMove is visible. »
  • The front end will also usually highlight the region corresponding to the result.
  • With direction specifications After and Before, SelectionMove will usually make the current selection be an insertion point between two units of the specified type. »
  • SelectionMove returns $Failed if it cannot move the selection in the way you request.
  • A GeneratedCell corresponds to an element of the output.

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

Select the first cell after the initial selection position:

Click for copyable input

Select the third cell after the initial selection position:

Click for copyable input

Move selection to a cell:

Click for copyable input

Select the button that triggered the evaluation:

Click for copyable input
Introduced in 1996
| Updated in 2012