Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid - Showing Selected Record in Differenct Color
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00239661
Message ID:
00240485
Views:
30
Barbara (and others who may read this),

Thanks for your reply. I have indeed looked at the information in help, where they use the MOD() function for alternately colored grid rows. That example works great in my form; however, it's not quite exactly what I need. And when trying to implement what I need (which, by the way, seems to be simple) it's not working. Ugghhhh! The following code is a sample of some the things I've tried. It seems straight-forward and simple enough, does it not?...
STORE RECNO() TO mSelectedRecord

* Debugging information...
MESSAGEBOX("What is mSelectedRecord? mSelectedRecord is:" + STR(mSelectedRecord))
IIF(RECNO()=mSelectedRecord, MESSAGEBOX("RECNO() is equal to mSelectedRecord"), MESSAGEBOX("It doesn't"))
* End of Debugging information

ThisForm.Grid1.SetAll("DynamicBackColor", ;
     "IIF(RECNO()=mSelectedRecord), RGB(255,255,255), RGB(0,255,0))", ;
     "Column")
When running this code, I do not get an error message, and there is absolutely no change in color at all on the grid.

Any help would be greatly appreciated. TIA, Chuck

>Chuck,
>Look at the Examples in the HELP for DynamicForeColor. It shows how to do it.
>
>HTH
>Barbara
>
>>Is there a way to make the entire row of a grid change ForeColor & BackColor when a record in the grid is double-clicked??? In my form, I have put up a selection grid for the user to double-click which record he wants to edit. In the grid txtbox DoubleClick I call a StartChange method, where I handle several things and was hoping to include the color change there as well. However, at this point, I can only get one cell at a time to change in the grid. TIA, Chuck Henry
Chuck Henry
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform