Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Textbox setfocus needs to be unset
Message
De
28/01/2005 12:16:05
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Divers
Thread ID:
00981705
Message ID:
00981802
Vues:
79
Thanks everyone for your help. I have got it to work. with the following code:
LOCAL llok, lctext, lnReturn
lctext = ALLTRIM(THIS.VALUE)
IF !EMPTY(lctext)
  THISFORM.moverlists1.lstSelected.ADDITEM(lctext)
  THISFORM.ltextbox = .T.
ELSE
  THISFORM.ltextbox = .F.
ENDIF
THIS.VALUE = ""
IF THISFORM.ltextbox = .T.
  THISFORM.textbox1.SETFOCUS()
  NODEFAULT
  RETURN
ENDIF
THISFORM.REFRESH()
Such a simple answer, that could not be seen by me, until talking with you and my co-worker.

Beth
>As Sergey is suggesting you need more control over the reaction to user input. That suggests you need to take over the keyboard handler for the control. Instead of playing around with lostfocus and gotfocus look at the keypress event. Setup a case structure to evaluate input and make the decisions you need: update the value, exit the control, stay in the control, clear the value, etc. Even though it is character by character evaluation it is very fast and the user will not see any difference.
>
>Steve
>
>>>Can you explain what you're trying to do?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform