Message Boards Message Boards

1
|
4500 Views
|
4 Replies
|
5 Total Likes
View groups...
Share
Share this post:

[Solved] Using a button to delete an output

Hi,

I created a little code to show my problem.

Manipulate[
 x + 1,
 Column[{
   Control@{x, 0, 9, 1},
   Button["Delete this application", "???"]
   }]
 ]

How do I delete the application output using the button? You cannot use "out [n]" for this, because when you run the code again, "n" changes its value.

I'll appreciate any help. Anderson

POSTED BY: Anderson Gaudio
4 Replies
POSTED BY: Kuba Podkalicki

Dear Kuba, Your code solved the problem. Thank you very much.

Best regards, Anderson

POSTED BY: Anderson Gaudio

Anderson,

This button will delete all output cells and reset a notebook:

Button["Reset Notebook", FrontEndExecute[
     FrontEndToken["DeleteGeneratedCells"]]]

Regards,

Neil

POSTED BY: Neil Singer
POSTED BY: Anderson Gaudio
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract