Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Gridhighlighter Colors
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01047761
Message ID:
01047911
Views:
12
Colin,
you would need to add the method to the grid class. If you are just using the VFP base classes then you can't so just add to the form.

If you are just using the VFP base classes and have not sub-classed all the base VFP classes then I suggest you get a good basic book on VFP and start doing it. I did it years ago and can't remember what book I had at the time.


>John
>
>Thanks for the answer
>
>Excuse my ignorance but how do I add a method to a grid?
>
>>>I have tried multiple colors in a grid before but so far have not cracked it even with help from the experts
>>>
>>>Let me try again
>>>
>>>I have a table called manifest which has a field called status
>>>
>>>If status is A I want to color the row blue
>>>If B the row will be red
>>>If C the row will be green
>>>
>>>How do I do it?
>>>
>>>A real layman's explanation would be greatly appreciated
>>>
>>>Thanks
>>>
>>>Colin Northway
>>
>>
>>Colin,
>>I'm not sure if this is the most efficent way but we create a new method on the form (or grid) with a case statement:
>>
>>METHOD StatColor
>>
>>do case
>> case status = 'A'
>>   return rgb(whatever color)
>> case status = 'B'
>>   return rgb(whatever color)
>> case status = 'B'
>>   return rgb(whatever color)
>>endcase
>>
>>Then, in each column of the grid in the DynamicBackColor we put:
>>
>>
>>Thisform.StatColor()
>>
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Previous
Reply
Map
View

Click here to load this message in the networking platform