Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Lostfocus calling Thisform.Refresh
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01465714
Message ID:
01465715
Vues:
44
>Hi Gang!
>
>A fellow programmer asked me about this, and I wasn't able to help him much on this....
>
>He has a form, which has a textbox and a button to the right of it.
>
>In the textbox, he has this code for the LOSTFOCUS of the textbox...
>
>
>IF EMPTY(this.value)
>            NODEFAULT
>ELSE
>            IF LEFT(this.Value,1) = ';'
>                        this.Value = SUBSTR(this.Value,2)
>            ENDIF
>
>            IF ATC('=',this.value) > 0
>                        this.Value = SUBSTR(this.value,1,ATC('=',this.value)-1)
>            ENDIF
>
>            Thisform.Refresh
>
>            thisform.cmdget_accounts.click()
>ENDIF
>
>
>The cmdget_acccounts is the button to the right of the textbox.
>
>When he scans in a card, or types in the card number, in the textbox, when he presses (ENTER), he wants the code to execute, and IMMEDIATELY show the substring of the scanned or typed in value, THEN process the number in the cmdget_accounts.click method.
>
>What happens is that when he presses (ENTER), there is about a 3 second delay, THEN the substring shows up in the textbox (was expecting it to immediately show up). It looks like it refreshes the form AFTER the cmdget_accounts.click processes.
>
>What do you thing? Is Thisform.Refresh allowed IN the Lostfocus?
>
>How would you recode this?
>
>Thanks!

May be it's better to use KeyPress event for such logic rather than LostFocus. Also, I would not try to call thisform.refresh() from LostFocus,
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