Message Boards Message Boards


How does one modify FrontEnd Tokens for Cell Menu?

Posted 9 years ago
2 Replies
2 Total Likes

I have two types of input and output cell styles. WorkedInput uses GeneratedCellStyles -> {"Output" -> "WorkedOutput"}.

With this Output, the Cell menu item for "Delete All Output" doesn't delete WorkedOutput cells. This is reasonable, but I'd like to have that functionality for my other output styles.

I note that references the FrontEndToken DeleteGeneratedOutput.

Does anyone know how I might modify or write my own FrontEnd token to delete all types of Output cells? If this is impossible with KeyEventTranslations, would a Palette be a good approach? If a palette would be a good approach, could someone give me a hint how to construct and install such a palette? Thanks, WCC

POSTED BY: W. Craig Carter
2 Replies

Dear Kuba, This works perfectly. Simple and elegant. Well done. Thanks.

POSTED BY: W. Craig Carter

I can't reproduce your problem but maybe you can use:

NotebookDelete @  Union[Cells[GeneratedCell -> True],   Cells[CellStyle -> "WorkedOutput"]]

to create palette:

   NotebookDelete @ Union[Cells[InputNotebook[], GeneratedCell -> True],  Cells[InputNotebook[], CellStyle -> "WorkedOutput"]]], 
  ImageMargins -> 15, Alignment -> Center]
POSTED BY: Kuba Podkalicki
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract