Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Question - Changing font color on text
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows Server 2003
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01553756
Message ID:
01553758
Vues:
84
You might want to look at this : http://support.microsoft.com/kb/132549

The bottom line is you set dynamicxxx properties of the columns. You give them a string that consist of vfp function that if evaluated at runtime returns the value of the xxx property that you want to set (rgb for color for example). Those "strings" are evaluated at runtime when the grid gets refreshed. Should be straightforward (well, it really takes some time to figure out) for output only grids.

For input/output grids, remember that your dynamic properties get refreshed when the grid gets refreshed, there should be a grid.refresh method though.

I know of implementations that are more straightforward, but once you get the idea, you can really do what you want.

Good luck.


>I have a grid with several columns of data in. I have set the property "Allow Cell Selection" to false so that the user can not change any values in the grid. I want to change the font color of the text in the text box under two conditions.
>
>Condition 1
> - If the value in a text exceeds a certain value then the font must be read of for that text box
>
>Condition 2
> - The text box in certain colums must be bold and in another color when the current row is highlighted.
>
>
>So if you look at the screen capture of my grid. I want the following:
> - values in the 3rd column to be red if the value is above 50
> - i want the value in the 3rd, 4th and 5th column where the row is highlighted to be bold and in another color.
>
>Is this possible and how do I go about doing this.
>
>Thanks in advance.
>
>Stuart

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform