Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bindevent
Message
De
30/08/2012 18:20:13
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
 
 
À
30/08/2012 02:19:45
Ed Hizon
Skswood Sdn. Bhd
Kuala Belait, Brunei
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01551919
Message ID:
01552093
Vues:
64
I use BINDEVENTs for our base grid class. I bind to several events -- LostFocus is one. It is bound to Grid.ControlLostFocus().
In ControlLostFocus I have
WITH This
   AEVENTS(oEvents,0)
   IF VARTYPE(oEvents[1])=="O"
      oControl = oEvents[1]
      oColumn = oEvents[1].Parent
   ELSE
      oColumn  = NULL
      oControl = NULL
   ENDIF
   IF NOT ISNULL(m.oColumn) 
      IF oControl.BaseClass = 'Container'
            ControlField = xxx  && more stuff here.
      ELSE
            ControlField = xxx
      ENDIF   
    .ControlCursorObject.Valid(m.ControlField)
ENDWITH
where the ControlCursorObject is one of our cursorAdapter classes.
My point is you can intercept here and do different behaviors depending on the control object's name or controlSource, etc.

>Dear all,
>
>I am adding number of columns to the grid programatically and issue bindevent event to the valid method of thetextbox
>What will be the workaround if I used bindevent() to the Valid method to make it fire. as if there was no code in the native valid event it will not fire. This is according to the help on bindevent()..."Certain events such as When and Valid require code in the event for it to occur."
>
>Indeed when I try to put in one of the column.text1.valid "nodefault" the assign method fired. but how can i put the 'nodefault' if I add some column programatically.
>
>Thanks in advance.
>
>Regards,
>Ed
Charlie
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform