1
$\begingroup$

This question already has an answer here:

How can I create a button which sits next to the cell, like so: http://i.imgur.com/ZFkgn5q.jpg

When you click the button it expands the cell, like this (note the cells on the right): http://i.imgur.com/3fyvUOJ.jpg

I can't find any code inside the Mathematica notebook for creating the button.

Duplicate of: Triangle that collapse cells

$\endgroup$

marked as duplicate by Kuba, bbgodfrey, Karsten 7., Simon Woods, Bob Hanlon Mar 8 '15 at 22:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2
$\begingroup$

You need to set the option ShowGroupOpener to True:

SetOptions[EvaluationNotebook[], ShowGroupOpener -> True]

You can also use $FrontEnd (resp., $FrontEndSession) instead of EvaluationNotebook[] to get the effect for the current and future front-end sessions (resp., the current session).

Alternatively, you can use the OptionInspector from the Format menu:

enter image description here

to set this option at theselected cell, selected notebook or global level.

$\endgroup$
  • $\begingroup$ Thanks! Can I delete the cell after evaluating it? $\endgroup$ – Lightvvind Mar 7 '15 at 19:33
  • $\begingroup$ @Lightvvind, you mean the cell with command SetOptions[...]? $\endgroup$ – kglr Mar 7 '15 at 19:36
  • $\begingroup$ Yes, or do I need to keep it in the notebook? $\endgroup$ – Lightvvind Mar 7 '15 at 19:39
  • $\begingroup$ @Lightvvind, you can make that line a self-destructing one (see, for example, this q/a). However, using the option inspector is probably easier/cleaner. $\endgroup$ – kglr Mar 7 '15 at 19:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.