Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Arrow Keys Don't Fire When, GotFocus, Click in Grid txtB
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00618623
Message ID:
00620353
Vues:
31
>>>>To create a New Method in a form, I know you go to Form - New Method. But how do you create a custom method in the grid?
>>>>
>>>>I do want the code to appear in only 1 place. It makes a project so much easier to maintain :-) TIA, Chuck
>>>
>>>Chuck,
>>>
>>>You need to have a special grid class in order to add new methods. You can not add new methods to base VFP controls.
>>
>>Nadya,
>>
>>Thanks. I am very familiar with creating custom methods on the form, so as to keep one instance of code in a central location, and it's been a life-saver. A UT member shared that bit of advice with me years ago. I can't remember his surname, but I think his first name is Jim, and he's a FoxPro author. Anyway, I haven't done any subclassing yet; so, I guess I still need to learn that one. I've always just re-used my objects by copying them from one form to another, etc.
>>
>>Thanks Again, Chuck
>
>Hi Chuck,
>
>Are you saying, that you haven't yet used classes in your applications and used base VFP classes everythere? This is very wrong, you have to create a library of all base VFP classes and customize these classes for your needs, if needed.
>
>For instance, we have wgControls library, there we have all base VFP classes subclassed. Several of them don't have anything set, so they use VFP default properties. Few have some custom code, like grid class, for example.
>
>Each application is based on these classes. If we need some specific code for the particular application, we subclass class from wgControls into new classlibrary, which would be in Classes of this application.
>
>BTW, I guess, the person, who gave this advice to you, was Jim Booth, though I could be wrong. He is MVP and author of VFP books.

Hi Nadya,

Yes, Jim Booth is the one. And, yes, I'm afraid I am saying that I haven't used classes in my applications and have used VFP base classes everywhere. If it's very wrong, I do want to rectify that.

Maybe if you can get me launched with the first step, I can try to figure out how to steer from there. For instance, I suppose the first thing to do is to create a library of all base VFP classes, as you referenced above. How is this done?
Chuck Henry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform