Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
New method within a class
Message
 
 
À
13/04/2009 20:37:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01394482
Message ID:
01394748
Vues:
241
This message has been marked as the solution to the initial question of the thread.
>class command_buttons
>
>command_buttons.savemode()
>WITH This
> .Parent.SetAll("Visible",.F.,"CommandButton")
> .cmdSave.Visible = .T.
> .cmdNo.Visible = .T.
>ENDWITH
>Thisform.SetAll("Enabled",.T.,"Textbox")
>
>
>cmdAdd.Click()
>APPEND BLANK
>This.Parent.savemode
>
>
>Form Pettycash has the command_buttons class. It has textboxes for data entry. Initially, all textboxes are disabled. So when the user clicks Add, it enables texboxes. This works fine.
>
>But since I want to setfocus on the first textbox on my form (txtPCVno), I open Pettycash form and put Thisform.txtPCVno.Setfocus on cmdAdd.click(). It does nothing even the original code on my class.
>
>What's wrong?

Evelyn,

Add
dodefault() to invoke default code of your class after new code.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform