Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: How edit a saved palette?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85241] Re: [mg85234] How edit a saved palette?
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Mon, 4 Feb 2008 03:08:13 -0500 (EST)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <200802030435.XAA11375@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

I now know how to extract the body of the palette into a new notebook 
(thanks to Yuri Kandrashkin).

What I get, when I look at the underlying expression, has the form:

  Cell[BoxData[GridBox[{
    {
     ButtonBox[...]},
    {
     ButtonBox[...]},

     (* etc *)
   },
   GridBoxSpacing->(* settings here *),
   NotebookDefault]

I can, of course, edit the individual buttons there.  But how do I turn 
this back into a palette?  If I surround the actual in-notebook grid 
with CreatePalette, that seems to do nothing.

I could change all the ButtonBox expressions to plain Button expressions 
and put those into a Grid, then wrap CreatePalette around it.  That 
seems like a lot of unnecessary work.  Moreover, it creates a palette 
with individual, "raised" buttons on the background of the palette, 
whereas I prefer the style of the original palette, which merely has the 
button names in a column directly on the background, without any 
separate, "raised" buttons on that background.

In case you're wondering, the palette I'm trying to modify is 
CellProperties.nb (as I recall this shipped with an old version of 
Mathematica or some set of tools for an old version of Mathematica). 
And all I'm trying to do is change the action on the Evaluatable button 
as dr DanW suggested in [mg85215]: set Opacity->0.5 when the cell is not 
evaluatable and restore Opactiy->1 when it is evaluatable.



Murray Eisenberg wrote:
> I have a palette somebody else wrote, which I want to edit.  So I have 
> no "source code" notebook for it.  I want to edit it, preferably in an 
> environment that understands Mathematica syntax.
> 
> Obviously, just opening it in Mathematica won't do: it appears as a palette.
> 
> I certainly don't want to edit it in some text editor, for that messes 
> up the cache and knows nothing about Mathematica syntax.
> 
> And I don't see how to edit it in Wolfram Workbench: If I try to Import 
> it, no matter whether I specify Initialization cells or Input cells, I 
> seem to get nothing -- just a message about the nb file from which 
> (nothing!??) was imported.
> 
> Recommendations?
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: For Loop and NDSolve
  • Next by Date: Re: For Loop and NDSolve
  • Previous by thread: Re: How edit a saved palette?
  • Next by thread: RE: How edit a saved palette?