MathGroup Archive 2011

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

Search the Archive

Re: SetOptions does not work with Grid

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115726] Re: SetOptions does not work with Grid
  • From: "andre.robin3" <andre.robin3 at wanadoo.fr>
  • Date: Wed, 19 Jan 2011 05:27:32 -0500 (EST)
  • References: <igmcri$5e$1@smc.vnet.net>

The answer complicated :

By me Grid[{{1, 1}, {2, 2}}]  appears always with a frame. I use Mathematica 
7,
but so far remember, Grid[{{1, 1}, {2, 2}}]  appears effectively always 
without a frame
on Mathematica 6. I guess you have mathematica 6.

Anyway, Grid[{{1, 1}, {2, 2}},Frame -> False] doesn't work by me and It's 
the same problem.
It is probably due to interactions between the option "Frame" and the option 
"Dividers" (May be it is
written in the documention. I don't have time to verify). What I am sure is 
that with only the option
"Dividers" you can do what you want.

Concerning SetOptions[Grid, Frame -> All], it doesn't work and it's not a 
bug. If
you want to change the default behaviour of Grid, for example to remove the 
Frame
in the whole notebook, you have to edit the Stylesheet of the notebook.

To edit the stylesheet of your notebook, do the following :
- select the windows of your notebook
- in the Top bar ->  Format
- Edit Style Sheet
- type Grid in the "Enter a style name" field
A new cell appears, whose name is "Local definition for style Grid".
-Select this cell
-type control-shith-O
-A new windows appears, with the name "Options for ..."
-type Dividers in the "lookup" field, then type return
While you type Dividers, the right part of the windows change. At the
end, you see a list of options beginning with GridBox.
-Look for the option GridBoxDividers, and change the both "False" to "True"
-Then press the button Apply.
The new options are immediately applied to your notebook.
You can now play with Dividers as you want, and do for example a Frame
(For this, I think you have to do {"Columns -> {True,{False},True},"Rows" -> 
{True,{False},True}}}
See the documentation).
Below the option GridBoxDividers, there is the option GridBox -> Frame. You 
can play with it, but
I don't know how it interacts with GridBoxDividers.



"István Zachar" <zac at freemail.hu> a écrit dans le message de news: 
igmcri$5e$1 at smc.vnet.net...
> Dear Group
>
> SetOptions is notoriously ignorant in case of some functions, like
> Grid, see code below. First grid appears without a a frame, though it
> should have one. Is it a bug? Is there a workaround other than
> Untprotecting Grid and use Options[Grid] = {new options..}?
>
> SetOptions[Grid, Frame -> All];
> Grid[{{1, 1}, {2, 2}}]
> Grid[{{1, 1}, {2, 2}}, Frame -> All]
>
> Istv=E1n
> 




  • Prev by Date: Re: Problems Exporting to PDF
  • Next by Date: Re: Using FindRoot on an equation involving Log terms
  • Previous by thread: Re: SetOptions does not work with Grid
  • Next by thread: Re: SetOptions does not work with Grid