Documentation for Win32lib v0.70.18
Table of Contents

Colors

  • func getColorDialog( window, default color )   "Get Color" Dialog

    Documentation for Win32lib v0.70.18
    Table of Contents

    [func]
    getColorDialog
    ( window, default color )

    "Get Color" Dialog

    Returns: Selected color, or default color if nothing selected.

    Category: Colors

    Calling this function brings up the modal "Select Color" dialog, allowing the user to select a color from the default color list, or add a color to the custom color list.

    The parameter passed in default color is an atom representing the default color to select, in #RRGGBB format. Passing -1 specifies that the color black (#000000) is the default color.

    Example:

              -- get a color; red ( #FF0000 ) is the default
              atom color
              color = getColorDialog( Window, #FF0000 )