MathGroup Archive 2008

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

Search the Archive

Can you minimize a notebook window from a notebook in Version 6? and

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84834] Can you minimize a notebook window from a notebook in Version 6? and
  • From: deepyogurt at gmail.com
  • Date: Wed, 16 Jan 2008 03:27:01 -0500 (EST)

Is there a way to minimize a Mathematica notebook window from within
another Mathematica notebook that opened it with a call to
NotebookOpen (I am using version 6 on a Mac if it matters), once the
notebook is open? I have a notebook that opens several notebooks, but
I only want a couple of them to show up on the screen initially, and
then later just making them visible is a single mouse-click away. Is
there a way to minimize the just opened notebook windows? Some way to
use the "Minimize Window" command (Apple-M on a Mac and Windows
version does not have the same menu command) or ??. I need to do this
from inside of Mathematica not from the OS.

For example there is routine called "FrontEndTokenExecute" that will
do 'some' of the menu commands, but not the "Window/Minimize" (it will
only do the "StackWindows", "TileWindowsWide" and "TileWindowsTall"
menu commands according the Doc Center). I have noticed that if you
open a notebook with something like:

   docpath =  ToFileName[{"/Volumes", "Data"}, "test"];
   nb1 = NotebookOpen[ToFileName[docpath, "testingminimizewindow.nb"],
WindowMargins -> {{10, Automatic}, {Automatic, 0}}, WindowSize ->
{957, 786}]

you get back a button looking thing in the output cell that has a
small icon at the left side of the button which if you position the
cursor on top of it, you get a tooltip that says "Bring this notebook
to the front" and if it were minimized or behind some other windows,
it would be brought up to be entirely visible. If you use "Cell/Show
Expression" to look at the underlying code in this output cell it
looks like(I have changed this a tiny bit to not use the real
filename):

Cell[BoxData[
 InterpretationBox[
  RowBox[{"NotebookObject", "[",
   PanelBox[GridBox[{
      {
       TooltipBox[
        ButtonBox[
         StyleBox[
          DynamicBox[FEPrivate`FrontEndResource[
           "FEBitmaps", "ManipulatePasteIcon"],
           ImageSizeCache->{13., {4., 9.}}],
          DynamicUpdating->True],
         BaseStyle->{},
         ButtonFrame->None,
         ButtonFunction:>FrontEndExecute[{
            FrontEnd`SetSelectedNotebook[
             NotebookObject[
              FrontEndObject[
               LinkObject["eni_shm", 1, 1]], 31]]}],
         Evaluator->None,
         Method->"Queued"],
        DynamicBox[
         FEPrivate`FrontEndResource["FEStrings",
"NotebookObjectToTheFront"]]],

       TagBox[
        TooltipBox["\<\"testingminimizewindow.nb\"\>",
         "\"/Volumes/Data/test/testingminimizewindow.nb\""],
        Annotation[#,
         "/Volumes/Data/test/testingminimizewindow.nb", "Tooltip"]& ]}
     },
     GridBoxAlignment->{
      "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" ->
{{Baseline}},
       "RowsIndexed" -> {}}],
    FrameMargins->{{4, 5}, {4, 4}}], "]"}],
  NotebookObject[
   FrontEndObject[
    LinkObject["eni_shm", 1, 1]], 31],
  Editable->False]], "Output",
 CellChangeTimes->{3.409452101304728*^9}]

Of which I thought an interesting command is:

         FEPrivate`FrontEndResource["FEStrings",
"NotebookObjectToTheFront"]]],

I tried something similar using "NotebookObjectToTheRear" and
"NotebookObjectToTheBack" but no luck, but perhaps this is only some
info related to the tooltip and nothing to do with the underlying
functions that bring the window to the front. Anyone know where these
type of function calls are documented or any other ideas??  Ideally, I
would like something that will work on both Mac and Windows versions
of Mathematica 6.

On a similar note, I cannot find anywhere in the Doc Center that
documents a routine called DynamicModuleBox. In fact there seems to be
a lot of things missing in the Doc Center about many of the low level
routines I see when I look at cells with "Show Expression". With
version 5, I could look just about everything up either online or in
the Stephen Wolfram "The Mathematica Book, 5th Editino" (the 1500 page
mMathematica bible). Anybody have any suggestion about how to look up
these low level routines??

Thanks very much...

-Bob F


  • Prev by Date: Re: problem with MLGetReal64Array
  • Next by Date: Re: Re: Re: Re: Creating a set from two other sets
  • Previous by thread: Re: Don't understand behavior of ClearAttributes[Plus,Orderless]
  • Next by thread: Point[] shapes at different sizes