Hi Fred,
Cell color works for me in VFP9/SP2 for an EditBox, but with one oddity, If
you click in another row, but the same column as the EditBox, it loses it's
color, but only on the initial clicking. If you first click in a different
row, different column from the EditBox, it keeps the dynamic color properly.
Maybe this is what you're seeing if you're only using a single column.
I did it programmatically, removing the Text1 object and adding an Edit1
(EditBox). If done that way, you need to make sure you set the newly added
object to Visible, and the Sparse to however you need it (.f.=all rows show
edit box)
In my form Init (or grid init using "this." instead of "thisform.grid1"):
WITH thisfrom.grid1
.column2.dynamicbackcolor="thisform.cellcolor(this)"
.column2.RemoveObject("text1")
.column2.AddObject("edit1","EditBox")
.column2.visible = .t.
.column2.sparse =.f.
ENDWITH
In my Form.Cellcolor method:
LPARAMETERS oObj AS grid && passed parameter for dynamicxxxx for "this"
is the grid
IF oObj.ActiveRow=1
RETURN RGB(0,255,255)
ENDIF
RETURN RGB(255,255,255)
------------------------
Looking at this a third time, I just produced these tests
I'm getting these test results:
READONLY = T for the grid with editboxes is causing the cell coloring to
fail
READONLY = T for the grid with textboxes cell coloring works
READONLY = F cell coloring works with both textboxes and editboxes
The case presented was the 1st.
VFP bug?
Bill
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.