Item

Item[expr,options]

represents an item within constructs such as Grid, Overlay, and Manipulate that displays with expr as the content, and with the specified options applied to the region containing expr.

Details and Options

  • The following options can typically be given:
  • AlignmentAutomaticalignment within the containing region
    BackgroundNonebackground color for the containing region
    BaseStyle{}base style specifications for the item
    ControlPlacementAutomaticwhen used in Manipulate, where controls should be placed
    FrameFalsewhether to include a frame around the containing region
    FrameStyleAutomaticstyle for the frame
    ItemSizeAutomaticoverall size allowed for the item
  • Frame->True specifies that a frame should be drawn around all edges of the item.
  • Frame->{bottom,left,top,right} specifies what should be drawn on each edge of the item.
  • Item effectively modifies the properties of a parent function which supports Item. If Item is not used inside of a function that supports it, the properties specified by Item will not be visible.

Examples

open allclose all

Basic Examples  (2)

Put a frame around the first element in a grid:

Draw the first element of the grid with a red background:

Scope  (3)

Draw a frame on certain faces of the item:

Center an annotation of a Manipulate:

Set alignments of individual objects in an Overlay:

Generalizations & Extensions  (3)

Item will apply its options to an entire spanning region:

Item also works in constructs that are implemented using Grid, such as MatrixForm:

Also TableForm:

Options that are irrelevant to the parent of the Item are ignored:

Options  (7)

Alignment  (1)

Change the alignment for a single item:

Background  (1)

Change the background for a single item:

ControlPlacement  (1)

Individually control the placement of an annotation:

Frame  (2)

Change the frame of a single item:

Remove the frame of a single item:

FrameStyle  (1)

Change the frame style of a single item:

ItemSize  (1)

Change the size of a single item:

Possible Issues  (2)

If Item is not the top-most item in the child of a function that supports Item, it will not work:

In most cases, it is easy to move Item to be the top-most child:

The background of an Item can blend with the ambient background color:

However, the background does not blend with a background specified directly to the parent Grid:

Neat Examples  (1)

Highlight special elements of a large matrix to see its structure:

Introduced in 2007
 (6.0)
 |
Updated in 2010
 (8.0)