Re: closing input cells
- To: mathgroup at smc.vnet.net
- Subject: [mg17551] Re: closing input cells
- From: "P.J. Hinton" <paulh>
- Date: Fri, 14 May 1999 01:13:15 -0400
- Organization: "Wolfram Research, Inc."
- References: <7h7srj$knq@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On 10 May 1999, Tom De Vries wrote: > I am working as an online math teacher and I often create sets of notes in > Mathematica that I send off to students. > > There are times that the input cells used to create the examples are > distracting and I often will close or delete the input cells so the notes > are easier to read. > > It is "nicer" to close the cells as then I can leave the file intact and > modify it later if I need to. > > Would there be a simple way to select all the input cells and close > them/open them at the same time? I know there is a menu command to delete > all the output cells in one swoop. Can I select all the input cells and > then change their cell property so they are all closed? > > Thanks for reading this, and thanks for any advice you might provide. Paste the following expression in a notebook and click Yes on the resulting dialog box. Cell[BoxData[ TagBox[ ButtonBox[ RowBox[{ RowBox[{"close", " ", "input"}], "\n", RowBox[{"cell", " ", "group"}]}], ButtonFunction:>FrontEndExecute[ { FrontEnd`NotebookFind[ FrontEnd`InputNotebook[ ], "Input", All, CellStyle], FrontEndToken[ FrontEnd`InputNotebook[ ], "SelectionCloseAllGroups"]}], ButtonEvaluator->None], DisplayForm]], "Output", Active->True] This button may be placed in the notebook that you wish to manipulate, or it can be converted into a standalone palette by selecting the cell's bracket and then clicking on the front end menu command sequence: File -> Generate Palette From Selection -- P.J. Hinton Mathematica Programming Group paulh at wolfram.com Wolfram Research, Inc. http://www.wolfram.com/~paulh/