Home | OS/2 Software | Rexx | Open the Color Palette

Open the Color Palette

Contributed by: Frank Wochatz

To use the standard - os/2 color-palettes:


 

Use the rexxutil function sysopenobeject

for solid-colors:
rc = SysOpenObject('<WP_LORESCLRPAL>','DEFAULT','TRUE')

for mixed-colors:
rc = SysOpenObject('<WP_HIRESCLRPAL>','DEFAULT','TRUE')

Now the user of your program can drag and drop colors from palette to an item of your application.
To get the colors use

backcol=VpItem(window,id,'GETBACKCOLORRGB')
forecol=VpItem(window,id,'GETFORECOLORRGB')