Last modified: December 2013

Jump to: Description · Examples · Bugs · See Also

AHELP for CIAO 4.11 ChIPS v1


Context: depth


Sets the default depth of the frame.


set_default_depth(id, depth)


The function arguments.

Argument Description
id A ChipsId structure identifying the item, or a string containing the name of the object.
depth An integer, 1 or greater, where 1 is the bottom level.

Each object has a default depth preference value which may be set in the ChIPS resource file or by calling the set_preference function. The value of the preference may be set to "default" or a positive integer value. If the value is "default", then the default frame depth is used.

The set_default_depth command sets the default depth of the specified frame to the indicated value. The new setting does not affect the depth of existing objects, only new ones created after the call to set_default_depth.

For general information on depth, refer to the ahelp depthcontrol page.


Example 1

chips> set_default_depth(25)

Set the default depth of the current frame to 25.

Example 2

chips> set_default_depth('all', 50)

Set the default depth of all frames to 50.

Example 3

chips> add_label(0.5, 0.5, 'Sample A')
chips> oval = get_default_depth()
chips> set_default_depth(oval + 10)
chips> set_label(["depth", oval + 10])

Add a label at the default depth. Set the default depth of the frame to be 10 higher than the original value. Update the label to use the new default depth value.


See the bugs pages on the ChIPS website for an up-to-date listing of known bugs.

See Also

depthcontrol, setget
collapse_depths, display_depth, get_default_depth, hide_depth, reindex_depth