Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: December 2013

URL: http://cxc.harvard.edu/chips/ahelp/get_frame.html
AHELP for CIAO 4.6 ChIPS v1

get_frame

Context: frames

Synopsis

Retrieves the attribute value(s) of the frame.

Syntax

get_frame()
get_frame(id)
get_frame(id, attribute)

Description

The function arguments.

Argument Description
id A ChipsId structure identifying the item, or a string containing the name of the object.
attribute The name of the attribute to retrieve, such as 'bgcolor' or 'transparency'.

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.

Please see the section "Frame Preferences and Attributes" below the examples for a list of the frame attributes.

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", "yellow"])
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".

Frame Preferences and Attributes

The attributes associated with frames are given in the following table, where the "Set?" column refers to whether the attribute can be changed using the set_frame() command. To change the frame preference settings prepend "frame." to the attribute name.

Attribute Description Options Default Set?
aspect Maintain the aspect ration of the frame when changing tiling modes? see the Booleans section of "ahelp chipsopt" true Yes
bgcolor Background color of the frame. name or hex; see the Color section of "ahelp chipsopt" default Yes
border.color Color of the border denoting the location of a frame in the window. name or hex; see the Color section of "ahelp chipsopt" default Yes
border.visible Boolean flag indicating if the frame border should be visible. see the Booleans section of "ahelp chipsopt" false Yes
mode how the frame is displayed in the window placed or single placed No
scale If set to true, all labels inside a window are rescaled as the window size is altered. see the Booleans section of "ahelp chipsopt" true Yes
stem Default stem for newly created frames An alpha-numeric character sequence that does not contain a space frm No
transparency Boolean flag indicating whether any object behind the frame is visible. see the Booleans section of "ahelp chipsopt" false Yes

Bugs

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

See Also

concepts
setget
frames
add_frame, arrange_frames, blink_frames, current_frame, delete_frame, display_frame, hide_frame, move_frame, next_frame, reposition_frame, set_frame, tile, view_placed_frame, view_single_frame
utilities
erase, get_object_count, set_current

Last modified: December 2013
Smithsonian Institute Smithsonian Institute

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-2014. All rights reserved.