MathGroup Archive 2002

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

Search the Archive

Re: Inherited Cell Option Values

  • To: mathgroup at smc.vnet.net
  • Subject: [mg35769] Re: [mg35321] Inherited Cell Option Values
  • From: Omega Consulting <omega_consulting at yahoo.com>
  • Date: Tue, 30 Jul 2002 07:22:22 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

At 02:17 AM 7/8/2002, Selwyn Hollis wrote:
>Hello MathGroupers,
>
>I'm trying to create some ButtonFunctions that modify cell margins. I
>have something that works very well, so long as the CellMargins option
>appears explicity in every cell---as, e.g., in
>
>Cell["abc","Text", CellMargins->{{10,0},{0,6}}].
>
>But with something like Cell["abc","Text"] or Cell["abc","Text",
>CellMargins->{{Inherited,Inherited},{0,Inherited}}],
>I'm stuck. The only thing I can think of is to provide the default
>values from the style sheet ``manually."
>
>Is it possible to determine the value of an inherited cell option? If
>one could somehow force inherited cell options to appear explicitly,
>that would provide a solution. Any ideas?
>
>Thanks in advance,
>Selwyn Hollis
>
>slhollis at mac.com
>http://www.armstrong.edu/faculty/hollis

You want AbsoluteOptions. For example, in one notebook do the following

In[1]:=
nbk=EvaluationNotebook[];

And create a text cell which you then select. In another notebook, do

In[2]:=
Options[NotebookSelection[nbk], CellMargins]

Out[2]=
{CellMargins->{{Inherited,Inherited},{Inherited,Inherited}}}

In[2]:=
AbsoluteOptions[NotebookSelection[nbk], CellMargins]

Out[3]=
{CellMargins->{{12.,10.},{7.,7.}}}

--------------------------------------------------------------
Omega Consulting
"The final answer to your Mathematica needs"

Spend less time searching and more time finding.
http://www.wz.com/internet/Mathematica.html



  • Prev by Date: Re: Package Puzzlers?
  • Next by Date: Re: J/Link
  • Previous by thread: Inherited Cell Option Values
  • Next by thread: Strategy for overly long computations?