Documentation for /home/davin/idl/socware/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

spedas/gui/utilities/

centertlb.pro


NAME: CENTERTLB PURPOSE: This is a utility routine to position a widget program on the display at an arbitrary location. By default the widget is centered on the display. AUTHOR: FANNING SOFTWARE CONSULTING David Fanning, Ph.D. 1645 Sheely Drive Fort Collins, CO 80526 USA Phone: 970-221-0438 E-mail: davidf@dfanning.com Coyote's Guide to IDL Programming: http://www.dfanning.com CATEGORY: Utilities CALLING SEQUENCE: CenterTLB, tlb, [x, y, /NOCENTER, /DEVICE] REQUIRED INPUTS: tlb: The top-level base identifier of the widget program. This must be a valid widget ID. OPTIONAL INPUTS: x: Set this equal to a normalized position for the center of the widget as measured from the left-hand side of the screen. The default value is 0.5 (the center) Setting this equal to 1.0 places the widget at the far right-hand side of the screen. y: Set this equal to a normalized position for the center of the widget as measured from the bottom of the screen. The default value is 0.5 (the center) Setting this equal to 1.0 places the widget at the top of the screen. KEYWORDS: DEVICE: Normally, the x and y parameters are specified in normalized coordinates. If this keyword is set, they are taken to be in DEVICE coordinates. NOCENTER: By default, the center of the widget is positioned at the location specified by the x and y parameters. If NOCENTER is set to a non-zero value, then the upper left corner of the widget is postioned at the specifed location. PROCEDURE: The program should be called after all the widgets have been created, but just before the widget hierarchy is realized. It uses the top-level base geometry along with the display size to calculate offsets for the top-level base that will center the top-level base on the display. COMMENT: Regardless of the values set for x, y and NOCENTER, the widget is not permitted to run off the display. MODIFICATION HISTORY: Written by: Dick Jackson, 12 Dec 98. Modified to use device-independent Get_Screen_Size function. 31 Jan 2000. DWF. Added x, y, NOCENTER and run-off protection. 26 Jan 2001. BT. Added a maximum value of 1280 for X screen size. This helps center the widget on a single monitor when using dual monitor settings with some graphics cards. 3 Feb 2003. DWF. Added DEVICE keyword. 4 January 2006. DWF.

Routines

top source CenterTLB

CenterTLB, tlb, x, y, NoCenter=NoCenter, Device=Device

Parameters

tlb
x
y

Keywords

NoCenter
Device

File attributes

Modification date: Thu Feb 13 16:41:47 2014
Lines: 27