coyote: CGCENTERTLB

Description
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.
Categories
Utilities
Params
tlb: in, required, type=long
   The top-level base identifier of the widget program. This must
   be a valid widget ID.
x: in, optional, type=integer
   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: in, optional, type=integer
   Set this equal to a normalized position for the center
   of the widget as measured from the top of the screen.
   The default value is 0.5 (the center) Setting this equal to 1.0
   places the widget at the bottom of the screen.
Keywords
centerontlb: in, optional, type=long
  If provided, the center of the widget is positioned at 
  the center of the widget whose ID is provided here.
device: in, optional, type=boolean, default=0
   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: in, optional, type=boolean, default=0
   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.
Author
FANNING SOFTWARE CONSULTING::
   David W. Fanning 
   1645 Sheely Drive
   Fort Collins, CO 80526 USA
   Phone: 970-221-0438
   E-mail: david@idlcoyote.com
   Coyote's Guide to IDL Programming: http://www.idlcoyote.com
History
Change 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.
   Added CenterOnTLB keyword. 7 March 2011. DJ.
   Renamed cgCenterTLB and retired the previous CenterTLB program. 29 Oct 2012. DWF.
   Fixed documention of y parameter. 1 Oct 2013. DWF.
Copyright
Copyright (c) 2012, Fanning Software Consulting, Inc.