ExitDialog in ButtonfFunction
- To: mathgroup at smc.vnet.net
- Subject: [mg23369] ExitDialog in ButtonfFunction
- From: "Perret" <Perret.Daniel at wanadoo.fr>
- Date: Thu, 4 May 2000 02:59:37 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hello,
my problem : how exit from a dialog by pushing a button ?
The following 'solution' dont work. Is there a better one ?
(caution : this cause a fatal error when you push the button ! )
FrontEndExecute[{
FrontEndToken[
NotebookPut[Notebook[{Cell["\<<\
CellPrint[Cell[BoxData[
ButtonBox[\"ExitDialog\",
ButtonEvaluator->Automatic,
ButtonFunction->(ExitDialog[]&),
Active->True]],\"Input\",
Active->True]]\
\>", "Input",
InitializationCell->True],
Cell["Dialog[]", "Input",
InitializationCell->True]},
InitializationCellEvaluation->Automatic]],
"EvaluateInitialization"
]}]
D Perret