How to remove key after KeyPreview

CBonnkirch

New Member
Licensed User
Hi together,

in the forum, i found lots of samples on how to use the door lib on the device. However, i did not found any sample for removing a key from the queue after "processing" it.

I want to catch and process some special keys (like cursor) in a text box. All other keys should simply pass through.

Thanks
Christof
 

specci48

Well-Known Member
Licensed User
Longtime User
Hello CBonnkirch,

I think you are missing the IgnoreKey method after you have catched your "special" keys.

E.g.
B4X:
Sub TextBox1_KeyPress (key)
   If key = Chr(46) Or key = "5" Then 
      ' do something other
      TextBox1.IgnoreKey
   End If
End Sub


specci48
 

agraham

Expert
Licensed User
Longtime User

Attachments

  • IgnoreKey.sbp
    1.6 KB · Views: 257
Last edited:
Top