Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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.

share|improve this question
3  
Try this: Select the cell with the code you want to hide, then select Cell > Cell Properties. Click on Open to uncheck it. –  m_goldberg Jun 11 at 14:31
    
Did what m_goldberg said above help you? –  Öskå Jun 12 at 9:01
    
@Öskå Well, the result was not exactly what I wanted; the closed cells are still visible. However the code is hidden. –  Behzad Jun 13 at 15:46
    
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) –  Öskå Jun 13 at 16:06
    
@m_goldberg Answer? –  Öskå Jun 13 at 16:35

1 Answer 1

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.

share|improve this answer
    
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? –  Vicent Aug 6 at 11:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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