Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Quickest way to copy several methods from one class
Message
De
18/05/2007 11:50:00
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01226347
Message ID:
01226801
Vues:
42
This message has been marked as a message which has helped to the initial question of the thread.
>>Hi Naomi,
>>
>>The control baseclass or the container would be candidates for such a behavior class, then put any control in it. Of course sounds simpler as it is.
>>
>>Bye, Olaf.
>
>I usually use custom class (or line) for functional objects. Don't remember ever using Control class.
>
>With the idea of container, do you mean you can have container based class for grid column's object? But if this is the case, perhaps, we can subclass Column class and add incremental search to the column class instead? I haven't thought of this.
>
>My particular problem is already resolved, but I'd like to learn all possible approaches here.
>
>Thanks again.

I just thought it would be nice to have a base control having the functionality but not being a textbox or editbox, just a control, to programm the universal case and subclass it being special controls. The control base class is like that.

I tried and Visually defined the following class (create class supresskeys as control in yourvcx.vcx, then add init and keypress code)
define class supresskeys as control
   procedure init()
      Bindevent(this.ocontrol,"keypress",this,"keypress")
   endif
   procedure keypress()
      LPARAMETERS nKeyCode, nShiftAltCtrl 
      nodefault
   endproc 
enddefine
Then I put in a textbox and named it oControl. There would be a lot more to it, than just binding keypress, but what I found out - and have already dealt with that same problem earlier - the bindevent does not work, you need to make it from oControl.Init() and bind this to this.parent there, so you'd need code in any control you put inside as oControl, which makes that solution useless.

Better forget about that suggestion, it makes more trouble than it solves.

Bye, Olaf.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform