Function reference |

## 1.2: uiextras.CardPanel

Show one element (card) from a list

`obj``= uiextras.CardPanel(``)`
  creates a new card panel which allows selection between the different child objects contained, making the selected child fill the space available and all other children invisible. This is commonly used for creating wizards or quick switching between different views of a single data-set.
`obj``= uiextras.CardPanel(``prop``,``value``,``...``)`
  also sets one or more property values.

### uiextras.CardPanel properties

Property | Value | Description
--- | --- | ---
`BackgroundColor` | `colorspec` | The color to use for exposed areas of the layout background. This can be an RGB triple (e.g. [0 0 1]) or a colour name (e.g. 'b').
`BeingDeleted` | [ on | off ] | is the object in the process of being deleted.
`Children` | handle array | List of child objects within this layout (note that this can only be set to permutations of itself).
`DeleteFcn` | `function_handle` | Function to call when the layout is being deleted
`Enable` | [ on | off ] | Is interaction with this layout enabled? Note that changing the enable property will cause all children contained to also be enabled/disabled, however since they can be individually re-enabled the state of this property does not reflect the state of the children. See the enable example for more details.
`Padding` | positive integer | Number of pixels of extra space around the outside of the layout.
`Parent` | handle | The handle of the parent figure or container.
`Position` | [x y w h] | The position (x,y) and size (w,h) of the layout.
`SelectedChild` | positive integer or empty | Which child is visible.
`Tag` | string | A string that can be used to identify this object later.
`Type` | string | the object type (class).
`Units` | [ inches | centimeters | normalized | points | pixels | characters ] | The units of measurement for position the layout within its parent.
`Visible` | [ on | off ] | Is the object visible on screen.

### For example:

    f = figure();
    p = uiextras.CardPanel( 'Parent', f, 'Padding', 5 );
    uicontrol( 'Parent', p, 'Background', 'r' );
    uicontrol( 'Parent', p, 'Background', 'b' );
    uicontrol( 'Parent', p, 'Background', 'g' );
    p.SelectedChild = 2;

See also:

- `uiextras.Panel` - for creating a standard panel
- `uiextras.BoxPanel` - for creating a more boxy panel
- `uiextras.TabPanel` - for a panel with tabs for selecting the visible child

© 2011 The MathWorks Ltd `•` Terms of Use `•` Patents `•` Trademarks