4
$\begingroup$

I downloaded the source code of a demonstration and modified it. Then saved it as a CDF file. When I re-opened this file (in Mathematica or CDF Player), all of the code can be seen. How can I hide the code so that only the manipulation panel be shown? I want it to be seen just as the demonstrations on the website demonstration.wolfram.com.

I searched this site but found no solution to my problem. By the way, I use Mathematica 8.0.

$\endgroup$
7
  • 4
    $\begingroup$ Try this: Select the cell with the code you want to hide, then select Cell > Cell Properties. Click on Open to uncheck it. $\endgroup$
    – m_goldberg
    Commented Jun 11, 2014 at 14:31
  • $\begingroup$ Did what m_goldberg said above help you? $\endgroup$
    – Öskå
    Commented Jun 12, 2014 at 9:01
  • $\begingroup$ @Öskå Well, the result was not exactly what I wanted; the closed cells are still visible. However the code is hidden. $\endgroup$
    – Behzad
    Commented Jun 13, 2014 at 15:46
  • $\begingroup$ Well, since the question was "Hiding the Code in .cdf file" I guess the fact that the code is now hidden answered the question ;o) $\endgroup$
    – Öskå
    Commented Jun 13, 2014 at 16:06
  • 1
    $\begingroup$ This is answered here also tex.stackexchange.com/questions/150970/… If you do not want to display the code and any other cells other than the display, then select the cells you want to hide and do cell->cell properties ->open to flip it to close. Now all cells are closed other than the display Manipulate cells and any other you did not select to close. $\endgroup$
    – Nasser
    Commented Jun 13, 2014 at 23:21

1 Answer 1

6
$\begingroup$

Try this: select the cell with the code you want to hide, then select Cell > Cell Properties. Click on Open to uncheck it.

The code will be hidden, but a skinny, residual, empty cell will remain. If there were no residual cell, there would no way to reopen the cell should that became necessary.

$\endgroup$
1
  • $\begingroup$ I am looking for an answer to the same question. Is this the way they use in the demonstrations @Behzad mentioned? By the way, the option Cell > Cell Properties > Editable should be also unchecked, or isn't it necessary when creating CDF documents? $\endgroup$
    – Vicent
    Commented Aug 6, 2014 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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