About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2008

URL: http://cxc.harvard.edu/chips4.1/get_frame.sl.html
AHELP for ChIPS 4.1

get_frame

Context: sl.chips

Synopsis

Retrieves the attribute value(s) of the frame.

Syntax

get_frame();
get_frame(id [,attribute]);

Description

  • id - an optional ChipsId structure containing values to modify the currency state for the command or a string id to specify the frame.
  • attribute - a string containing the name of the attribute to retrieve

The get_frame command returns a structure containing all the attribute values of the frame. To retrieve the value of a specific attribute, provide the attribute name and the id or ChipsId of the object.

Some values are set to "None" in the returned structure. These entries generally correspond to attributes which may only be modified at creation time, such as the object id.

The attributes associated with frames are:

Attribute Description
bgcolor Background color of the frame
border.color Color of the frame border
border.visible Boolean flag indicating if the frame border should be visible
scale Boolean flag indicating whether labels should scale if frame changes size
transparency Boolean flag indicating whether any object behind the frame is visible

To see if a frame or frame border is hidden or visible, use the get_frame_visible and get_frame_border_visible commands.

Advanced Functions

The module of advanced ChIPS functions contains other commands for retrieving attribute values (refer to "ahelp chips" for information on loading the module):

get_frame_bgcolor
get_frame_border_color
get_frame_scale
get_frame_transparency

Example 1

chips> add_frame;
chips> print(get_frame());
chips> print(get_frame("frm1","bgcolor"));

A frame is created and becomes current. Calling get_frame with no argument returns all the attributes of the object. get_frame is called a second time to return just the "bgcolor" attribute.

Example 2

chips> add_frame( .1, .1, .4, .7, "bgcolor=red");
chips> add_frame({"bgcolor", "red"});
chips> print(get_frame("frm1"));

Two frames are created. get_frame is called with the id of the first frame, returning all attributes.

Example 3

chips> id=ChipsId();
chips> id.frame="frm1";
chips> print(get_frame(id));

A ChipsId structure is created and the id.frame field is set to "frm1". get_frame is called with the ChipsId.

Example 4

chips> frmatt=get_frame;
chips> print(frmatt);

Retrieve a structure containing the attribute values of the current frame and store the results in "frmatt". Print the contents of "frmatt".

Bugs

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

Last modified: December 2008



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.