Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Aw: Re: Is a conditional evaluation of sections of a notebook possible?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg119810] Aw: Re: Is a conditional evaluation of sections of a notebook possible?
  • From: UweT <uwe.thuemmel at googlemail.com>
  • Date: Thu, 23 Jun 2011 07:26:17 -0400 (EDT)
  • Reply-to: comp.soft-sys.math.mathematica at googlegroups.com

Heike indeed pointed in a good direction. For me the following worked:

setEvaluatable[condition_] := (NotebookLocate["tag"];
  If[condition==value,
   SetOptions[NotebookSelection[], Evaluatable -> False,
     Background -> LightRed];,
   SetOptions[NotebookSelection[], Evaluatable -> True,
     Background -> None];]);

If condition==value is True all cells with tag "tag" are set to Evaluatable->False and the background color of these cells is changed to LightRed.  If condition==value is False, the cells with tag "tag" are set to Evaluatable->True and the background color of the cells is set to None.

Best,
Uwe


  • Prev by Date: Re: Assigning part of indexed object
  • Next by Date: Re: Assigning part of indexed object
  • Previous by thread: Re: pattern example
  • Next by thread: Automatic Equation Numbering when "save as"Latex