OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: hildevasco on November 19, 2008, 04:17:16 AM

Title: Error in the text box at the event OnKeyDown
Post by: hildevasco on November 19, 2008, 04:17:16 AM
The event OnKeyDown in Textbox uses the character parameters which does not represent the key press
Title: Re: Error in the text box at the event OnKeyDown
Post by: Fred Tomke on November 19, 2008, 05:25:03 AM
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
Title: Re: Error in the text box at the event OnKeyDown
Post by: hildevasco on November 19, 2008, 05:38:46 AM
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 "")
  )
)
Title: Re: Error in the text box at the event OnKeyDown
Post by: hildevasco on November 19, 2008, 06:39:10 AM
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