|
[Date Index]
[Thread Index]
[Author Index]
Re: Re: Buttons to close and open cells at certain
- To: mathgroup at smc.vnet.net
- Subject: [mg75709] Re: [mg75663] Re: [mg75605] Buttons to close and open cells at certain
- From: Murray Eisenberg <murray at math.umass.edu>
- Date: Wed, 9 May 2007 04:24:50 -0400 (EDT)
- Organization: Mathematics & Statistics, Univ. of Mass./Amherst
- References: <200705060553.BAA03847@smc.vnet.net> <200705080949.FAA18528@smc.vnet.net>
- Reply-to: murray at math.umass.edu
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.
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 = #) &]]}]]]]
--
Murray Eisenberg murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305
Prev by Date:
Re: [Mathematica 6] Format->Style sheet->Report. no CELL brackets
Next by Date:
Re: problem with DumpSaving SparseArrays in 6.0
Previous by thread:
Re: Buttons to close and open cells at certain levels?
Next by thread:
Re: Re: Re: Buttons to close and open
|