Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use an Assign method
Message
De
14/09/2002 09:05:46
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00700481
Message ID:
00700490
Vues:
11
>Hi.
>I have a form with a no. of conrols on it e.g.
>Text1
>Text2
>Text3 whose control source are fields on a file.
>
>I want to set up an assign method for some of these contols so that when a value is changed, something happens.
>
>When I go into Form properties and try to set up a new property called Text1 , it says its already there
>
>If I set up a new method called Text1_asign, nothing happens
>
>Any ideas on what I am doing wrong ?
>
>Regards,
>
>Gerard

Gerard,
In order to add assign method you need to subclass the textbox control. ie:
define class myTextBox as Textbox
 procedure Value_Assign
 lparameters vNewVal
 * do something
 this.Value = vNewVal && Or reject - do not set
endproc
enddefine
However you don't need to create an assign method for value. There are already events that fire when you change value of textbox like InterActiveChange, ProgrammaticChange, Valid. And even LostFocus might be what you need.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform