>  Docs Center  >  Libraries  >  Coyote  >  CW_DRAWCOLOR
Libraries

CW_DRAWCOLOR

CW_DRAWCOLOR

Name


      CW_DRAWCOLOR

Purpose



      This compound widget is used to place a label or color name next
      to a color patch. Clicking on the color patch allows the user
      to select another color

Author



      FANNING SOFTWARE CONSULTING
      David Fanning, Ph.D.
      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

Category



      Graphics

Calling Sequence



      colorpatchID = CW_DrawColor(parent)

Required Inputs



      parent - The identifier of a parent base widget.

Outputs



      colorpatchID - The widget identifier of the top-level base of this compound widget

Input Keywords



  COLOR - The name of the color to be displayed. Color names come from PickColorName.
  COLUMN - Set this keyword to stack widgets in a column. Default is in a row.
  EVENT_FUNC - The name of an event handler function for this compound widget.
  EVENT_PRO -The name of an event handler procedure for this compound widget.
  INDEX - An index number where the color should be loaded. !D.Table_Size-2, by default.
  FILENAME - An optional input to pickcolorname specifying different
              colors. See pickcolorname description for the file format.
  LABEL_LEFT - Set this keyword to have the label text aligned on the left of the label. Default is to center.
  LABEL_RIGHT - Set this keyword to have the label text aligned on the right of the label. Default is to center.
  LABELSIZE - This is the X size of the label widget (containing the label) in device coordinates. Default is natural size.
  LABELTEXT - This is the text on the label. Example, "Background Color", etc.
  TITLE - This is the title on the PickColorName program that allows the user to select another color.
  UVALUE - A user value for the widget.
  XSIZE - The xsize (in pixel units) of the color patch. By default, 20.
  YSIZE - The xsize (in pixel units) of the color patch. By default, 20.

Output Keywords



  OBJECT - The object reference. Use this to call methods, etc.
  OBJECT PROCEDURE METHODS:
  Set_Value -- this method takes one argument, the new color name.
              It will change the color of the widget if it has
              already been realized.
  Get_Value -- this method returns the color name the widget is displaying

Dependencies



      Reqires cgColor and PICKCOLORNAME from the Coyote Library:
                    http://www.idlcoyote.com/programs/cgColor.pro
                    http://www.idlcoyote.com/programs/pickcolorname.pro

Modification History



      Written by David W. Fanning, March 2001.
      Fixed a problem with self object cleanup. 7 March 2006. DWF.
      Allow addition to already realized widget hierarchies, October 2007. L. Anderson.
      Added set_value and get_value methods to the widget can be
            updated after being realized. October 2007. L. Anderson.
      Added option to pass filename on to pickcolorname. October
            2007. L. Anderson



© 2024 NV5 Geospatial Solutions, Inc. |  Legal
   Contact Us