I think if you put a number (a constant) at the iCounter place, it works.. it wants a fixed value if i remember correctly.
I think you should do it another way.. or so i have seen something like that done.
Here it is how i did it also the same.. don't know if there's another way but this one works fine.
1. First saving handles of the columns on initialization (for example).
2. Then on row display estabilishing if the column handle is the one you're looking for from name. And then doing the assign of the color or what you want.
In code below i have loaded a celda_br1 (an array) all handles needed when opening the frame
Code:
DO n_cols_browse1 = 1 TO browse-1:NUM-COLUMNS:
celda_br1[n_cols_browse1] = browse-1:GET-BROWSE-COLUMN(n_cols_browse1).
END.
n_cols_browse1 = browse-1:NUM-COLUMNS.
Then i do this to change all columns bg color, but i think you can do your stuff easily
Code:
ON row-display OF browse-1 IN FRAME z DO:
DEF VAR col_act AS INTE NO-UNDO.
DEF VAR cual_celda AS WIDGET-HANDLE NO-UNDO.
IF [condition] THEN DO:
DO col_act = 1 TO n_cols_browse1:
cual_celda = celda_br1[col_act].
cual_celda:BGCOLOR = g_c_w_bg.
END.
END.
END.