Good Morning Marcia,
>Hi Agnes.
>
>
Does it replace the standard textbox or add it a new Object?>
>That depends on how you build the grid < s >. If you define your grid as having a ColumnCount of either -1 or some number greater than 0, VFP automatically creates base class columns with base class text boxes and headers. You then have to remove these base class columns before you re-add your custom columns.
>
>When you add your custom columns, they are created with the custom headers and text boxes that you define in their class definition using ADD OBJECT. If you do not specify a custom header or textbox class using ADD OBJECT, then they are instantiated using base classes. Is that a little more clear?
Yes. I will love it. This is much better then the MEMBER* thing - the way I do it. ::)
>
BTW Is there a reason that you EVALUATE the columns and not use THIS.COLUMNS(lnCol).***?>
>Because we are removing columns inside that loop and the column referenced using the columns collection and the index will be incorrect. All you need to do to convince yourself of that fact is to add this code:
>
>
>MESSAGEBOX( This.Columns[ lnCol ].name )
>
>
>inside the loop and see what happens < s >. You will see a messageBox for Column1, Column3 and Column5 (if your grid is defined with 5 columns) before you get an error.
:;)
FOR lnCol = lnColumnCount TO 1 STEP -1
I feel I prefer this way because the grid build from 1 to ColumnCount and I remove it like a stack.
So even if I fail for some reason, the System ColumnCount - Column
N remains. I have no idea what could fail but I never know.
Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]