MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Nested Manipulate copies to clipboard as "grey box"

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124321] Re: Nested Manipulate copies to clipboard as "grey box"
  • From: John Fultz <jfultz at wolfram.com>
  • Date: Tue, 17 Jan 2012 03:20:19 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Reply-to: jfultz at wolfram.com

If you convert the Manipulate to literal first,  you can get the copy to work.  
Here's the code to convert the current selection in the InputNotebook[] to 
literal (taken from the code in MenuSetup.tr for Evaluation->Convert to 
Literal):

FrontEndExecute[{FrontEnd`NotebookDynamicToLiteral[
FrontEnd`NotebookSelection[FrontEnd`InputNotebook[]]]}]

Warning...this is a destructive operation, so you'll probably want to perform 
this on a copy of the Manipulate cell.

Yes, the fact that you need to do this is a bug, but I can't guarantee it'll be 
fixed promptly.

Sincerely,

John Fultz
jfultz at wolfram.com
User Interface Group
Wolfram Research, Inc.

On Sat, 14 Jan 2012 17:06:15 -0500 (EST), Szabolcs Horv=E1t wrote:
>
> It seems a nested Manipulate will not copy correctly as a bitmap.
>
> Here's a toy example:
>
> Manipulate[
> Manipulate[
> Plot[Sin[k x]^n, {x, 0, 10}], {k, 1, 5}], {n, {1, 2, 3, 4}}]
>
> Evaluate this, select the output cell, then choose Edit -> Copy As ->
> Bitmap.  I believe this is only available on Windows.  Then paste the
> bitmap back to the notebook to view it.
>
> The inner Manipulate's contents will show as a grey box.
>
> Is there a workaround for this?
>
> Motivation: I am using
> FrontEndTokenExecute[FrontEnd`SelectionNotebook[], "CopySpecial", "MGF"]
> to obtain a rasterized version of the selection in the notebook.  I have
> not found any other reliable way to rasterize the notebook selection
> without changing the way it looks.





  • Prev by Date: Re: Question about DeleteCases to remove list elements based on first character
  • Next by Date: Re: Question about DeleteCases to remove list elements based on first character
  • Previous by thread: Nested Manipulate copies to clipboard as "grey box"
  • Next by thread: save palette as eps