Hi all,
I am having some trouble with a textfield. I want any key input on a window to be directed to the textfield.
I put this in the Window.Keydown event:
if AscB(key)>31 and ascb(key)<127 then
searchField.Text=key
searchField.SelStart=1
searchField.SetFocus
searchField.TabIndex=0
end if
return false
Should this not set the textfield’s text to the key pressed by the user and also put the cursor at the end?
However all it does is continually overwrite the searchField with 1 character. The searchfield.SetFocus does not place the cursor into the searchfield; the Window retains the focus somehow in that the Window.Keydown event keeps getting called no matter how many times the searchfield.Setfocus is called.