Knowledge Base
Valid For#HMI
Applies ToHMI430

This instruction sets the foreground and background colours.

Function Prototype
# SetColours(
f:ForegroundColour,
b:BackgroundColour
)
ParameterOptionDescription
foptionalThe foreground colour, that is, the colour of text.  If unspecified, retains the existing colour.  Refer to Colour Values.
boptionalThe background colour.  If unspecified, retains the existing colour.  Refer to Colour Values.
Description

This instruction sets the system wide colours that will be used by Print() and as defaults for ButtonEvent2().  You may specify both or just one of the colours.  Specifying just one means the unspecified colour will remain as is.

Colours are specified in either RGB or ARGB format, refer to the colours page for more information.

Examples
HUEkTitle       #EQU 'FFCOCOCO ;gray
HUEkTitleBgnd #EQU '800000C0 ;50% blue
HUEkText #EQU 'FFFFFFFF ;white
HUEkTransparent #EQU '00000000

#HMI SetFont( "normalbold.fon" )
#HMI SetBounds( x:0, y:0, w:100%, h:1 )
#HMI SetColours( f:HUEkTitle, b:HUEkTitleBgnd )
#HMI Cls()
#HMI Print( "\CSetup Menu" )
#HMI SetBounds() ;cancel the bounds
#HMI SetColours( f:HUEkText, b:HUEkTransparent )

This will draw gray text on a blue title bar.