Error in the text box at the event OnKeyDown

Started by hildevasco, November 19, 2008, 04:17:16 AM

Previous topic - Next topic

hildevasco

The event OnKeyDown in Textbox uses the character parameters which does not represent the key press

Fred Tomke

Hello, welcome to this forum.
Can you give us a little example of that what you mean and what you expected to get from OnKeyDown?

If you want to get the current input, try OnEditChanged. I use this very often.

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

hildevasco

I wish monitor the entry of values in a text box. The only characters allowed
are between 47 and 57 Asc codes for different values the caracater should be zero. I gather that the error in the language of the keyboard configuration of the system do not correctly interpret the characters on the keyboard

Sample code
(defun c:txtData_OnKeyDown (Character RepeatCount Flags /)
  (if (or (< (ascii Character) 47) (> (ascii Character) 57))
    (setq Character "")
  )
)

hildevasco

I need to monitor the entry of data into the text box and a numerical values double or integer values and another date formatted as mm/dd/yyyy

Thank you