Re: notebook question
- To: mathgroup at smc.vnet.net
- Subject: [mg27564] Re: [mg27543] notebook question
- From: Tom De Vries <tdevries at shop.westworld.ca>
- Date: Wed, 7 Mar 2001 04:08:04 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Hello John!! Thanks for the response. This is good information and works just fine on a Mac.... the interesting this with creating a notebook this way is that (at least for me) NotebookClose[questions] works just fine, but trying to close the notebook from the file menu doesn't! Thanks for the help, that will work nicely! Sincerely, Tom De Vries > From: John Fultz <jfultz at wolfram.com> To: mathgroup at smc.vnet.net > Date: Sun, 4 Mar 2001 02:20:13 -0600 (CST) > To: tdevries at shop.westworld.ca (Tom De Vries) > Cc: mathgroup at smc.vnet.net > Subject: [mg27564] Re: [mg27543] notebook question > > Create your notebook as follows: > > questions = NotebookCreate[WindowFrameElements->{"ZoomBox", "ResizeArea"}] > (* note the default for this option also includes "CloseBox" *) > > > This will disable the close button and Close menu item, but NotebookClose[] > will still work (at least this is how it behaves on Windows...I think > the behavior will be the same everywhere but confess to not having > investigated the matter). > > Sincerely, > > John Fultz > jfultz at wolfram.com > User Interface Group > Wolfram Research, Inc. > > > >> Hello everyone, >> >> I have a question that I hope someone can help with. >> >> Suppose I create a notebook that I am going to write information to.... >> >> questions = NotebookCreate[] >> >> I can then send "whatever" to this notebook.... >> >> NotebookWrite[questions, >> Cell[TextData[{"This is a test, ", >> Cell[BoxData[ >> FormBox[SqrtBox[SuperscriptBox["x", "2"]], TraditionalForm]]]}], >> "Text"]] >> >> I am working on a set of math lessons where the user will click on a button >> and a math question will be generated and sent to a particular notebook that >> will be created >> >> The question is..... once the notebook "questions" has been created..... >> how can I either prevent this notebook from being closed by a "user" so I >> know that it will be there to write to, or, if the notebook gets closed, >> be able to check for that and reopen it...? >> >> I can do something like..... (which works....) >> >> If[NotebookInformation[questions] == $Failed, questions = NotebookCreate[]]; >> >> Where NotebookInformation returns $Failed if there is no "questions" >> Notebook open >> >> I wonder if anyone else had some ideas about this....? >> >> Sincerely, >> >> Tom De Vries >> >> > >