MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Re: Buttons to close and open

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:
>>  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 = #) &]]}]]]]

  • Prev by Date: Re: Re: MathPlayer???
  • Next by Date: Re: Re: MathPlayer???
  • Previous by thread: Re: Re: Buttons to close and open cells at certain
  • Next by thread: HarmonicNumber bug and related Zeta disappointments