VOTools for Visual Objects  
and Vulcan.NET  

bBrowser => Tips & Tricks => How to change the background color, if the bBrowser gets the...    




 from bBrowser
1.4
  bBrowser 1.4 (Limited)
yes
 

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

Copyright © 2003-2015 BEFO GmbH