Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Header Equivalent to Columns(i)
Message
From
16/03/1999 16:47:09
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00198314
Message ID:
00198344
Views:
17
>>>In a grid, I can generically cycle throun the columns with This_Grid.Columns(i).whatever. But if I have changed the name property to the column headers, I can not do This_Grid.Columns(i).Headers(i).whatever. Is there an equivalent for headers like ther is for columns? Or am I doomed to cycle through all the column objects looking for the object with a baseclass of *Header*?
>>>
>>>TIA
>>
>>So why change the header object name? Is there some reason you couldn't just cycle through your columns collection referencing This_Grid.Columns(i).Header1 ?
>
>This was an old project (VFP3) being revisited and brought up to VFP 6 version. I don't rename my column headers as a practice, but there is exactly 1 grid done this way. I just wanted to be able to cycle thru without changing the header names back to the default plus all the other references throughout the grid methods. I have a grid subclass where I have a method to change the header caption color based on the order tag of the record source [red for the current sorted column, blue for other columns that can be sorted]. My baseclass used the This_Grid.Columns(i).Header1.Forecolor = ... Just wanted to know if I could make it more generic with a Headers() reference.

Well, since Headers isn't a collection, I guess you're stuck searching.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform