Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Building object name and calling it
Message
From
06/03/2017 03:45:49
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
05/03/2017 18:50:29
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01648762
Message ID:
01648800
Views:
58
>Well! Thanks a lot Cetin! I had looked all over the web, an found only the ability to change row and column colors, but not individual cells. I am most impressed - thank you again! Please advise if your posting on UT is still available.

I found this link:

https://www.levelextreme.com/ShowHeaderArticleOneItem.aspx?ID=7934

Looking back to it, it was not very detailed and seems like doesn't have the latest version that I remember.

Normally colouring is applied to rows, that is most known usage. However since a dynamic method applies to a column, you can combine row and column to make it for individual cell(s).

Also, a grid cell can contain almost anything, including another grid :) If you create some controls on form, select them and save as a class, then you would have a container class that you can use in a grid cell. That is what I did in this sample. The only trick is that, you need to their colouring, setting fonts etc, via a call to parent column's one the dynamic methods. I used DynamicFontBold just because in VFP every method/function/procedure returns a value (.T. by default).

One note: Even for simple colouring I suggest using a method that returns you a color instead of iif() or icase(). That is because, when the expression gets complex it is easier to write it wrong, and VFP wouldn't give an error saying your expression is invalid, but simply wouldn't apply the dynamic color.

(I am writing this on Mac safari and it does make spelling correction making colors as colours etc. I thought in US-English it was colors).
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform