Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Column Control - DynamicBackColor
Message
From
25/06/2008 16:36:07
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Column Control - DynamicBackColor
Miscellaneous
Thread ID:
01326762
Message ID:
01326762
Views:
63
Hi All --

I am stumped. I have a simple grid. The grid has a table. I have set the DynamicBackColor to pull from a function (i.e.
DynamicBackColor = "MyFunction( arg_a, c_row_pk)"
), where the function returns an RGB value for the BackColor.

The interesting part comes with the arguments being passed. The second argument is the Row Primary Key (lc_row_pk), which lets me know what row I am processing. The first argument is the sticky one. It is supposed to be something to ID which column or field is being processed.

Recall that the DynamicBackColor property is a column level property applied on a cell-by-cell (row-by-row) basis. Thus, one can say:
lo_grd.SetAll("DynamicBackColor", "IIF( MOD(RECNO(), 2) = 0, RGB(0,255,0), RGB(0,0,0) )")
This is typical. In the typical example above, we're interested in a row level property (i.e. RECNO()). We can also respond to record level field values (i.e. "c_row_pk" above). What I CANNOT see just yet is how to get a bead on what column or field is being processed. I need this to know how to manage the back color.

You folks have any ideas???


Thanks in advance,
Larry
Next
Reply
Map
View

Click here to load this message in the networking platform