Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Column Control - DynamicBackColor
Message
 
 
To
25/06/2008 16:36:07
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01326762
Message ID:
01326768
Views:
23
This message has been marked as the solution to the initial question of the thread.
I guess you can assign DynamicBackColor for each column instead passing name of the column (or associated field) to the generic function. I don't see a better way right now.

>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
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform