Please enable JavaScript to view this site.

ESL Documentation

Object Inquiry Built-in Function

Return the background color of a graphical, image, or textual region.

background of REGION_NAME

REGION_NAME

The identifier for a graphical, image, or textual region.

Description

Use the background of function for graphical, image, and textual regions only. The value returned is the integer value associated with the background color of the specified region.

Example

 

boolean variable On is false

enabled visible red region Switch ...

enabled visible green region DoIt ...

integer constant Red is 1

 

response to Switch_PB

 if (On) then

         make OnOff_GR blue

 else

         make OnOff_GR red

 end if

 copy not(On) to On

 

response to DoIt_PB

 if (background of OnOff_GR = Red) then #color 1 is red

         send "turned on\n" to errorlog

 else

         send "turned off\n" to errorlog

 end if

See Also

color Keyword

foreground at and background at Object Inquiry Built-in Functions

foreground of Object Inquiry Built-in Function

make COLOR Action Statements