Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Classes not to subclass
Message
De
28/05/2003 00:38:52
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
27/05/2003 08:28:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00792211
Message ID:
00793349
Vues:
31
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 - ColumnN 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.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform