Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid--which column do I have?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00233472
Message ID:
00233891
Views:
29
>Hi Bruce,
> I need to know the absolute number of the column for which I have an object referenceto. Since columns can be moved, the relative column number is not useful for this purpose. For example, if the user moves the 3rd column one position to the left, its relative column number becomes 2 but its absolute column number is 3. I need to know how to get the '3' from an object reference to the column.

I see...unless, like you, I'm missing something obvious, that's not real straightforward. You could "pick off" the end of the column name, assuming they're numbered sequentially, though that's not a very elegant solution :)

If you have a column class, you could add a property to fill at grid init that would keep a fixed track. If just a grid class, you could have an array that is updated in column Moved to keep track. If all base classes, you could do the same with a form array property...a couple ideas, anyway...

Also, ss Dovi suggested, if you have a fixed view or cursor, you could then use the field number, though that may not be viable, and not a generic solution...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Reply
Map
View

Click here to load this message in the networking platform