MathGroup Archive 2007

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

Search the Archive

Re: Re: Palettes install

  • To: mathgroup at smc.vnet.net
  • Subject: [mg76724] Re: [mg76674] Re: Palettes install
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Sat, 26 May 2007 04:38:34 -0400 (EDT)
  • Organization: Mathematics & Statistics, Univ. of Mass./Amherst
  • References: <f2md1u$khh$1@smc.vnet.net> <200705251046.GAA08338@smc.vnet.net>
  • Reply-to: murray at math.umass.edu

That simple palette is a wee bit easier to parse if you use Column, 
which avoids the nested lists:

   Column[{
     Button["Hello",Print["Hello"]],
     Button["Good morning",Print["Good morning"]]
    }]

dh wrote:
> Hi,
> 
> here is a simple example how to create a palette with 2 buttons. The 
> 
> buttons do nothing else than print a message. First create the buttons by:
> 
> Grid[{{Button["Hello",Print["Hello"]]},
> 
> {Button["Good morning",Print["Good morning"]]}
> 
> }]
> 
> then select both buttons and click: Menue/Palettes/Generate Palette from 
> 
> Selection. This will create a palette.
> 
> hope this helps, Daniel
> 
> 
> 
> alexxx.magni at gmail.com wrote:
> 
>> Hi,
> 
>> although I use M since some years, just recently I started peeking
> 
>> beyond my immediate, number-crunching interests (with the woes&wonders
> 
>> of V6.0, of course!)
> 
> 
>> I saw some posts talking about the possibility to create useful
> 
>> palettes (I know it's old stuff: as I told you I simply never wandered
> 
>> beyond NIntegrates...).
> 
> 
>> Can somebody explain me how to install them? I tried copy/pasting in a
> 
>> new .nb notebook, then Palettes->Install Palette: type Palette,
> 
>> Source:from file, Install name:Tutorials, but nothing happens.
> 
>> The .nb follows, stolen from this post:
> 
>> http://groups.google.it/group/comp.shttp://groups.google.it/group/comp.soft-sys.math.mathematica/post?hl=itoft-sys.math.mathematica/browse_frm/thread/b43a5539ac5a3fa0/4d8d37c4ec14f912?hl=it#4d8d37c4ec14f912
> 
>>  , by  Selwyn Hollis.
> 
> 
> 
>> Thanks for any help!!!
> 
> 
>> Alessandro Magni
> 
> 
>> ----------------------------------------------------
> 
> 
>> columns = 3;
> 
>> SetDirectory[$InstallationDirectory <>
> 
>>     "/Documentation/English/System/Tutorials"];
> 
>> overviewNames =
> 
>>    StringReplace[#, {".nb" -> ""}] & /@ FileNames["*Overview.nb"];
> 
>> SetDirectory[$HomeDirectory]; docpaths =
> 
>>   FileNames[
> 
>>    "*Overview.nb", {$InstallationDirectory <>
> 
>>      "/Documentation/English/System/Tutorials"}, Infinity];
> 
>> CellPrint@Cell[BoxData[GridBox[
> 
>>      Partition[PadRight[#, columns*Ceiling[Length[#]/columns], " "],
> 
>>         columns] &[
> 
>>       ((ButtonBox[((l = StringLength[#];
> 
>>                If[l < 25, #, StringTake[#, 23] <> "..."]) &)@
> 
>>             StringReplace[
> 
>>              First[#], {"Overview" -> "", "And" -> "&",
> 
>>               StartOfString ~~ "The" -> "", "Administration" ->
> 
>> "Admin",
> 
>>               "TwoDimensional" -> "2D", "Operations" -> "Ops"} ],
> 
>>            ButtonFunction :> (NotebookOpen[Last[#]]),
> 
>>            Evaluator -> Automatic] &) /@
> 
>>         Transpose[{overviewNames, docpaths}])]]],
> 
>>    ButtonBoxOptions -> {BaseStyle -> {FontSize -> 9, FontFamily ->
> 
>> "Arial",
> 
>>        Bold}, FrameMargins -> {{2, 2}, {0, 0}},
> 
>>      Background -> RGBColor[1, 0.96, 0.87]},
> 
>>    GridBoxOptions -> {RowSpacings -> 0, ColumnSpacings -> 0}]
> 
> 
> 
> 
> 

-- 
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: drawing
  • Next by Date: Re: Re: Re: Weird result in Mathematica 6
  • Previous by thread: Re: Palettes install
  • Next by thread: 3D bar graph in Mathematica 6?