Hi Bill,

Change the EditBox.DisabledBackcolor when it's disabled (ReadOnly=.t. or
Enabled=.f.)  Still suffers the same column click problem.

In  the previous code I posted for CellColor method:
LPARAMETERS oObj AS grid
IF oObj.ActiveRow=1
  oObj.column2.edit1.disabledbackcolor = RGB(192,192,192)
  RETURN RGB(0,255,255)
ENDIF
oObj.column2.edit1.disabledbackcolor = RGB(255,255,255)
RETURN RGB(255,255,255)

Fred


On Fri, Oct 12, 2012 at 8:56 PM, Bill Arnold <
[email protected]> wrote:

> 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
>
>
>
[excessive quoting removed by server]

_______________________________________________
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/cajcbksr4swt_opmfh+som8yhwegaslh8gmohvcmnqjpnrnd...@mail.gmail.com
** 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.

Reply via email to