>Is there any reason a field set as a numeric type will not accept negative
>numbers?  Last I checked, numbers less than zero still existed. ;-)

A definite oversight in the number-handling routines. Here's how we handled
it in our EditFormHandleKeystroke function:

// at the very end of the keystroke-handling routine,
// filter characters for numeric field to allow negative #s

  fldPtr = GetFocusObjectPtr ( );
  if ( fldPtr ) {
    if ( fldPtr->id == theFieldThatNeedsNegNumbers ) {
      if ( IsPrint ( GetCharAttr ( ), key )) {
        if (( ! IsDigit ( GetCharAttr ( ), key )) && ( key != '-' )) {
          return ( true );
  } } } }
 return ( false);

Hope that helps.

Regards,
Steve Mann

-------------------------------------------
Creative Digital Publishing Inc.
1317 Palm Street, San Luis Obispo, CA 93401-3117
-------------------------------------------
805.788.0138            805.593.3811 (fax)
[EMAIL PROTECTED]       http://www.cdpubs.com


Reply via email to