Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change border color of cell in grid?
Message
De
30/10/2023 14:41:59
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01687147
Message ID:
01687150
Vues:
43
>>>...my grid nightmare continues...
>>>
>>>Is there a way to change the border color of an individual cell in a grid based on the value in that cell? Or am I just dreaming of how cool something could be that can't be?
>>
>>Have a custom control for that, and set sparse for the column differently, so your control would display in the current row and regular textbox in the others. In the custom control's .lostFocus() and .gotFocus() set the border as you like it.
>>Or, alternately, use column's .dynamicCurrentControl and have two of those, but the expression for it would be a tad complicated (based on recno() and currently active column).
>>
>>Now don't ask me what's the meaning of sparse=.t. or =.f., I never managed to memorize it. If I didn't like the result, I'd change it.
>
>That seems like it would only work if the cursor was in the cell? What I'm trying to do is any cell that has the character "A" in it, change the border of that cell to red.

Ah, then two controls, one with the border and one not, and dynamiccurrentcontrol checks for the content of the cell. That's simpler than I thought.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform