Please enable JavaScript to view this site.

A-Shell Consolidated Reference

Revised and reviewed July 2020

Num  These parameters allow you to override the default control foreground (text) and background colors, in some cases. Some controls do not allow the applicatioin to override colors, and in other cases Windows Themes may override your attempts to do so. Specify these values as –1 to use the "current" colors (if applicable to the control type), or –2 to use the default Windows colors. (The "current" colors are those that would apply to ordinary PRINT statements, i.e those set by TAB(-2,x) and TAB(-3,x) or SET TERM FCOLOR and SET TERM BCOLOR.)

To request an override of the foreground and background colors when Windows Themes are not in effect, you may specify a palette color number in the range of 0-15 (same as would be used with the TAB(-2,x) and TAB(-3,x) commands.)

To override the foreground and background colors even when Themes are active (assuming this is even possible for the control type and Theme), do one of the following:

Add +64 to the palette index value. For example, if 3 is the palette index for magenta, to request magenta even when it contradicts the default for the Theme, specify 3+64.
Instead of a palette index value, specify an RGB value. RGB values are made up of 3 bytes, with the low byte representing the Red, the second byte the Green, and the third byte, the Blue values. This is most easily accomplished using hex notation, i.e. &h00bbggrr where rr, gg, and bb are the red, green and blue values, each ranging from 00 to FF. Note that this may appear to reverse the order of the rr, gg, and bb, values, but is necessary for direct compatibility with the Windows RGB format, which uses the least significant byte for the red. Also note that since an overall RGB value of between -2 and 15 might be confused with a palette index, to avoid confusion, make sure that either the blue value > 0, or the green value is > 0, or the red value > 128. You can also experiment with the RGB values and corresponding colors via the Settings..Colors dialog (click on one of the color buttons, then the "Define Custom Colors" button; as you move the pointer and slider bar, you'll see the Red, Green and Blue values appear in the boxes.

History

2011 June, A-Shell 5.1.1220.1:  New pseudo RGB symbol RGB_TRANSPARENT (&h02020202) may be specified with static and checkbox/radiobutton controls to create a transparent background, providing an alternate method for making those controls blend into non-standard window background colors.