Re: Palette Question
- To: mathgroup at smc.vnet.net
- Subject: [mg43108] Re: [mg42885] Palette Question
- From: Omega Consulting <info at omegaconsultinggroup.com>
- Date: Tue, 12 Aug 2003 04:43:18 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
At 12:25 AM 8/1/2003, Peter Breitfeld wrote: >I created a Palette in the following way: > >[*** snipp ***] >Notebook[{ >Cell[BoxData[GridBox[{ > { > ButtonBox["RealOnlyOn", > ButtonData:>"RealOnlyOn[]"]}, > { > ButtonBox["RealOnlyOff", > ButtonData:>"RealOnlyOff[]"]}, > { > ButtonBox["RealTime3DEin", > ButtonData:>"<<RealTime3D`"]}, > { > ButtonBox["RealTime3DAus", > ButtonData:>"<<Default3D`"]} > }, > RowSpacings->0, > ColumnSpacings->0, > GridDefaultElement:>ButtonBox[ "\\[Placeholder]"]]], NotebookDefault, > CellFrame->False, > CellMargins->{{Inherited, Inherited}, {0, Inherited}}, > Evaluatable->True, > CellGroupingRules->"InputGrouping", > CellHorizontalScrolling->True, > PageBreakAbove->True, > PageBreakWithin->False, > GroupPageBreakWithin->False, > CellLabelMargins->{{23, Inherited}, {Inherited, Inherited}}, > CellFrameColor->RGBColor[0.6, 0.2, 0], > DefaultFormatType->DefaultInputFormatType, > LineSpacing->{1.25, 0}, > AutoItalicWords->{}, > FormatType->InputForm, > ScriptMinSize->9, > ShowStringCharacters->True, > NumberMarks->True, > CounterIncrements->"Input", > StyleMenuListing->None, > FontFamily->"Courier", > FontWeight->"Bold", > Background->RGBColor[0.996109, 0.976577, 0.906264], > ButtonBoxOptions->{ButtonStyle->"EvaluateCell"}] >}, >[*** snipp ***] > >This works as expected. When klicking the button, the command (eg. >RealOnlyOn[]) is pasted in the notebook an evaluated. But I wonder if >it's possible to avoid the pasting in the notebook, and only perform the >command without any output? I tried different approaches using >ButtonFunction and EvaluateNotebook but to no avail. > > >Gru� Peter >-- >=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--=--= >http://www.pBreitfeld.de > Peter Breitfeld, Bad Saulgau, Germany | Meinen GnuPG/PGP-5x Key gibts dort Try the following type of button: ButtonBox["RealOnlyOn", ButtonEvaluator -> Automatic, Active -> True, ButtonFunction :> RealOnlyOn[]] -------------------------------------------------------------- Omega Consulting "The final answer to your Mathematica needs" http://omegaconsultinggroup.com