home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / GRAPHICS.DI$ / UISETCOL.M < prev    next >
Encoding:
Text File  |  1993-03-19  |  1.2 KB  |  31 lines

  1. %UISETCOLOR Interactively set a ColorSpec by displaying a dialog box.
  2. %    C = UISETCOLOR(ARG, 'dialogTitle') displays a dialog box for the 
  3. %    user to fill in, and applies the selected color to the input 
  4. %    graphics object.
  5. %
  6. %    The parameters are optional and may be specified in any order.
  7. %
  8. %    ARG may be either a handle to a graphics object or an RGB triple.
  9. %    If a handle is used, it must specify a graphics object that supports 
  10. %    color.  If RGB is used, it must be a valid RGB triple (e.g., [1 0 0] 
  11. %    for red).  In both cases, the color specified is used to initialize
  12. %    the dialog box.  If no initial RGB is specified, the dialog box
  13. %    initializes the color to black.
  14. %
  15. %    If parameter 'dialogTitle' is used, it is a string containing the 
  16. %    title of the dialog box.
  17. %
  18. %    The output value C is the selected RGB triple.  If the input parameter
  19. %    is a handle, the graphics object's color is set to the RGB color 
  20. %    selected.
  21. %
  22. %    If the user presses Cancel from the dialog box, or if any error 
  23. %    occurs, the output value is set to the input RGB triple, if provided; 
  24. %    otherwise, it is set to 0.
  25. %
  26. %    Example:
  27. %        C = uisetcolor(hText, 'Set Text Color')
  28.  
  29. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  30. %    Built-in function.
  31.