DataWindow Column Highlighting Of The Current Row In PowerBuilder
DataWindow Column highlighting Of The Current Row In PowerBuilder
In the datawindow painter, double-click on the column in question and click on the tab mark “Expressions”.
Add this code to the background.color property
1 | if(currentRow() = getrow(), rgb(0,255,0), rgb(255,255,255)) |
In the rowfocuschanged event for the datawindow control use this example:
currentrow is a event argument
1 | dw_1.Modify ("<colname>.background.color='0~tif(" + String (currentrow) + " = GetRow (),rgb(0,255,0),rgb(255,255,255)) '") |
dot notation
1 | dw_1.Object. < colname > .background.Color = "0~tif (CurrentRow() = GetRow(),rgb(0,255,0),rgb(255,255,255))" |
Good Luck!