Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Textbox setfocus needs to be unset
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows 2000 SP4
Miscellaneous
Thread ID:
00981705
Message ID:
00981802
Views:
80
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?
Previous
Reply
Map
View

Click here to load this message in the networking platform