Even as of PowerBuilder 9, this is NOT possible by using a 'simple' dw expression because there is no GetColumn() or GetColumnName() datawindow-function whereas there is a GetRow() dw function!!! Hope Sybase realizes the need of this function and offers it in future.
The only way to achieve this effect is to write a global function (in fact, a couple of functions) and use them in the dw-column's expression:
////////////////////////////////////////////////////////
FUNCTION string f_GetColumnName()
RETURN gs_ColumnName
FUNCTION f_SetColumnName( string as_ColumnName )
gs_ColumnName = Trim( as_ColumnName )
Ancestor dw.ItemFocusChanged! event:
-----------------------------------
f_SetColumnName( dwo.Name )
dw Column.Background.Color attribute (expression):
-------------------------------------------------
If( f_GetColumnName() = "<col>", RGB( 128,128,128 ), RGB( 255,255,255 ))
////////////////////////////////////////////////////////
You may use the STANDARD Windows' hilite color such as the Navy Blue for the hilite color by querying the Control Panel: HKEY_CURRENT_USER\Control Panel\Colors that can be written as another global function to parse the values and return the long color value to use in the column's expression.
Hope this helps...
---
PowerObject!
-----------------------------------------
PowerBuilder / PFC Developers' Group