MathGroup Archive 2000

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

Search the Archive

ButtonBox, styles, GraphicsGenerator.nb

  • To: mathgroup at smc.vnet.net
  • Subject: [mg24997] ButtonBox, styles, GraphicsGenerator.nb
  • From: pdickof at sk.sympatico.ca (Peter Dickof)
  • Date: Fri, 1 Sep 2000 01:09:30 -0400 (EDT)
  • References: <8hfgjn$i54@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In the GraphicsGenerator notebook available on MathSource, an example
is given of  button which generates a plot in a standalone notebook
window. The notebook then says

"Earlier in this notebook, we took some pains in separating
task-specific material from things that might be reusable.  Gathering
the set of reusable ButtonBox objects together, we can place them in a
StyleData cell in a style sheet so that you can speed the creation of
similar buttons.  Here is an example of what a cell style might look
like

Cell[StyleData["PutGraphicInWindow"], StyleMenuListing -> None, 
    ButtonStyleMenuListing -> Automatic, 
    ButtonBoxOptions -> {ButtonEvaluator -> "Automatic", 
        ButtonFunction :> (NotebookPut[
                Notebook[{Cell[GraphicsData["PostScript",
DisplayString[#2]], 
                      ShowCellBracket -> False]}, WindowSize -> {300,
250},  
                  WindowElements -> {}, WindowTitle -> "Graphics"]] &
), 
        Active -> True}] // CellPrint


The sample notebook never actually resuses thuis, and I can't figure
it out. 

I copied this to a notebook which I put in the /
../configuration/FrontEnds/StyleSheets directory. It still does not
appear in the Input/Create Button or Input/Edit button menu. Isn't it
supposed to?

Also I try to include it directly in a notebook and then use it in
command

   ButtonBox[ToExpression["Plot3D[Sin[x] Cos[y],{x,0,2Pi}, {y,0,2Pi}, 
		DisplayFunction->Identity],
	ButtonStyle->PutGraphicInWindow]

and nothing happens

What am I doing wrong?

Peter Dickof
pdickof at sk.sympatico.ca


  • Prev by Date: Re: Re: mathlink
  • Next by Date: Re: Re: opening files
  • Previous by thread: Re: Re: mathlink
  • Next by thread: Re: ButtonBox, styles, GraphicsGenerator.nb