Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Show text in text box as help, but clear when typeing
Message
 
À
30/01/2012 13:57:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01534085
Message ID:
01534106
Vues:
59
This message has been marked as a message which has helped to the initial question of the thread.
Change KeyPress to:
 PROCEDURE text1.KeyPress
        LPARAMETERS nKeyCode, nShiftAltCtrl

        IF INLIST(nKeyCode, 5, 9, 13, 15, 24) && DownArrw (24), UpArrow (5), Tab (9), Shift+Tab(15), Enter(13)
           DODEFAULT(nKeyCode, nShiftAltCtrl)
           RETURN
        ENDIF

        NODEFAULT 
        IF nKeyCode > 31 AND NOT thisform.Starttyping
           thisform.Starttyping = .t.
           this.ForeColor       = RGB(0,0,0)
           this.Value           = []
        ENDIF

        DODEFAULT(nKeyCode, nShiftAltCtrl)

        IF EMPTY(this.Value) OR;
           ALLTRIM(this.Value) == "ClaimNo./Claimant"
           thisform.Starttyping = .f.
           this.ForeColor = RGB(192,192,192)
           this.Value = "ClaimNo./Claimant"
           this.SelStart = 0
        ENDIF

    ENDPROC
>thanks works perfectly. I abandond my version. But one problem:
>hitting the enter key does not leave the control to run the code in lostfocus()
>:-((
>Peter
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform