Re: Palettes install
- To: mathgroup at smc.vnet.net
- Subject: [mg76674] Re: Palettes install
- From: dh <dh at metrohm.ch>
- Date: Fri, 25 May 2007 06:46:31 -0400 (EDT)
- References: <f2md1u$khh$1@smc.vnet.net>
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}]
>
>
- Follow-Ups:
- Re: Re: Palettes install
- From: Murray Eisenberg <murray@math.umass.edu>
- Re: Re: Palettes install