*EDITFOCUSBGCOLOR (SETMODE)


PLBCMP GUI Only

*EDITFOCUSBGCOLOR={value}

 

The *EDITFOCUSBGCOLOR list control sets the default focus background color when anobject is created. If a COMBOBOX, EDITTEXT, EDITNUMBER or RICHEDITTEXT object is created with the EDITFOCUSBGCOLOR enabled, the object's background color is set to the value specified when the object gains focus. When the object loses focus, the background is set to the normal background color.

Note the following:

  1. The {dnumnvar} is a four-byte integer.

  2. The {dnumnvar} value may specify the color as a BGR value or a Windows system color index.

  3. When the high order byte contains a value of 0x0, the next three bytes (twenty-four bits) are interpreted as a BGR value.

  4. When the high order byte has a value of 0x80, the lower order byte is an index value into the Windows system colors.

  5. When the {dnumnvar} value evaluates to '0xFFFFFFFF', the keyword is disabled and any objects created do not used a focus background color.

Example:

 

COLOROFF

INTEGER

4,"0xFFFFFFFF" ;Disable EDITFOCUSBGCOLOR

BLUEBGR

INTEGER

4,"0xFF0000"

GREENBGR

INTEGER

4,"0xFF00"

REDBGR

INTEGER

4,"0xFF"

LTBLUEBGR

INTEGER

4,"0x0FDFED8" ;Light Blue BGR ( BLUE,GREEN,RED )

.

 

 

E

EDITTEXT

 

E1

EDITTEXT

 

EN

EDITNUMBER

 

.

 

 

 

SETMODE

*EDITFOCUSBGCOLOR=LTBLUEBGR

.

 

 

 

CREATE

E=5:6:5:25, TABID=10, BORDER=1

 

CREATE

E1=8:9:5:25, TABID=20, BORDER=1

 

CREATE

EN=11:12:5:25, TABID=30, BORDER=1

.

 

 

 

SETITEM

E,0,"EditText"

 

SETITEM

E1,0,"EditText"

 

SETITEM

EN,0,"0"

.

 

 

 

ACTIVATE

E

 

ACTIVATE

E1

 

ACTIVATE

EN

.

 

 

 

SETFOCUS

E

.

 

 

 

LOOP

 

 

WAITEVENT

 

 

REPEAT

 

 

 

See Also: List Controls (SETMODE), SETMODE

 



PL/B Language Reference *EDITDATETIMEUTC (SETMODE) *EDITHILITE (SETMODE)