>Thanks. Im using precisely F4 to get the focus on the combo box, but I suppose that can be changed. Anyway, I found that Alt+DownArrow does the same. Now another question: is it possible to change the backcolor of a field in a grid depending on the value of that field? Not the whole column or row, but that single field.
>TIA Again
>Ulises
I would also suggest to start a new thread and try to explain the problem better. For instance, if you want to change the backcolor of the cell in a grid, when it's selected, you should put code in a textbox.GotFocus() event.
Here is an example of my textbox class used in a grid:
with this
if .parent.readonly
set cursor off
endif
.backcolor=.parent.parent.cCurRecBackColor
.forecolor=.parent.parent.cCurRecForeColor
.fontbold=.t.
.OldValue=.value && Save the current value
with .parent.header1
.backcolor=rgb(64,128,128) && green
.forecolor=rgb(255,255,255) && white
endwith
endwith
dodefault()
It used in the "highlighted" grid, class, provided by Cetin Basoz.
If it's not broken, fix it until it is.
My Blog