Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change border color of cell in grid?
Message
 
To
30/10/2023 14:41:59
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01687147
Message ID:
01687151
Views:
46
>>>>...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.

Interesting -- I've never used the dynamiccurrentcontrol gizmo -- I will give it a try, - seems like it shouldn't be too difficult compared to everything else I've done to this grid from hell lol Its gonna be one coooool grid though.
ICQ 10556 (ya), 254117
Previous
Reply
Map
View

Click here to load this message in the networking platform