Re: Re: Re: Buttons to close and open
- To: mathgroup at smc.vnet.net
- Subject: [mg75760] Re: [mg75709] Re: [mg75663] Re: [mg75605] Buttons to close and open
- From: Carl Woll <carlw at wolfram.com>
- Date: Thu, 10 May 2007 05:08:12 -0400 (EDT)
- References: <200705060553.BAA03847@smc.vnet.net> <200705080949.FAA18528@smc.vnet.net> <200705090824.EAA12231@smc.vnet.net>
Murray Eisenberg wrote: >That's not working for me in 6.0: I get the checkbox control, but >checking/unchecking it seems to do nothing about collapsing or expanding > cell groups. All it does it cause the notebook to flicker >momentarily after the check appears or disappears. > > Did you have any Subsubsection cells in the notebook (style level cmd-6 in the OP's idiom)? My checkbox control basically just opens and closes Subsubsection cells. It should be simple to modify the check box if different behavior is desired. If you have cells that are not grouped at some point under a Subsubsection cell, then nothing will happen with those cells. Carl Woll Wolfram Research >Carl Woll wrote: > > >>AES wrote: >> >> >> >>>I'd love to have a template for a cell I could put at or near the top of >>>many of my notebooks that would have two buttons: click one button and >>>all cells except cells at Style levels cmd-5 and cmd-6 (and the button >>>cell itself) immediately close; click the other button, they all open >>>back up again. >>> >>>In other words, a single-click "Collapse to outline form showing section >>>and subsection cells only" and then a single-click re-open capability >>>(and this should operate, incidentally without depending upon or messing >>>around with how any of the Cell Grouping rules are set). >>> >>> >>> >>If you have version 6, then the following code might do the trick: >> >>SetOptions[InputNotebook[], >> DockedCells -> >> Cell[BoxData[RowBox[{"Outline: ", CheckboxBox[Dynamic[x, >> (nb = InputNotebook[]; >> If[#, >> NotebookFind[nb, "Subsubsection", All, CellStyle]; >> FrontEndTokenExecute["SelectionCloseAllGroups"]; >> SelectionMove[nb, Before, Notebook], >> SelectionMove[nb, All, Notebook]; >> FrontEndTokenExecute["SelectionOpenAllGroups"]; >> SelectionMove[nb, Before, Notebook] >> ]; x = #) &]]}]]]] >> >> > > >
- References:
- Buttons to close and open cells at certain levels?
- From: AES <siegman@stanford.edu>
- Re: Buttons to close and open cells at certain levels?
- From: Carl Woll <carlw@wolfram.com>
- Re: Re: Buttons to close and open cells at certain
- From: Murray Eisenberg <murray@math.umass.edu>
- Buttons to close and open cells at certain levels?