How to change
the background color, if the bBrowser gets the focus
If the bBrowser gets or loses the focus, the bBrowser examines
whether in its owner the callback method ControlFocusChange()
is defined and calls this with a FocusChangeEvent as argument.
In the callback method e.g. the background color of the bBrowser
can be changed.
The following code fragment demonstrates the proceeding:
|
METHOD ControlFocusChange(oFocusChangeEvent)
CLASS myDataWindow
LOCAL oControl AS OBJECT
oControl := oFocusChangeEvent:Window
IF oFocusChangeEvent:GotFocus
oControl:Background := Brush{Color{COLORYELLOW}}
ELSE
oControl:Background := NULL_OBJECT
ENDIF
|
|