Re: closing input cells
- To: mathgroup at smc.vnet.net
- Subject: [mg17677] Re: closing input cells
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Fri, 21 May 1999 23:58:57 -0400
- References: <7h7srj$knq@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Tom De Vries <tdevries at mail2.westworld.ca> wrote in message news:7h7srj$knq at smc.vnet.net... > Hello! > > 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. > > Tom De Vries > Edmonton, Alberta, Canada > > Tom, Here is the cell expression for a cell containing a button that will close all input cells. I make it text cell so that it will not close itself, but this will not be a problem if you make it into a palette or inlude it in a utilities palett of you own - if you put such a palette into the folder C:\Program Files\Wolfram Research\Mathematica\3.0\SystemFiles\FrontEnd\Palettes or whatever this corresponds to in your system then it will show in the menu of palettes like the one provided. However, it might be better to keep add-on palettes separate, in the folder C:\Program Files\Wolfram Research\Mathematica\3.0\Configuration\FrontEnd\Palettes Cell[BoxData[ ButtonBox[ RowBox[{"Close", " ", "Input", " ", "Cells"}], tonFunction:>CompoundExpression[ NotebookFind[ SelectedNotebook[ ], "Input", All, CellStyle], SetOptions[ NotebookSelection[ SelectedNotebook[ ]], CellOpen -> False]], Active->True]], "Text"] Allan --------------------- Allan Hayes Mathematica Training and Consulting Leicester UK www.haystack.demon.co.uk hay at haystack.demon.co.uk Voice: +44 (0)116 271 4198 Fax: +44 (0)870 164 0565