>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
Re: Numeric field with negative numbers
Creative Digital Publishing Inc. Tue, 18 May 1999 12:04:34 -0700
- Numeric field with negative numbers Dave Lippincott
- Re: Numeric field with negative numb... Creative Digital Publishing Inc.
- Re: Numeric field with negative numb... Roger Chaplin
- Re: Numeric field with negative numb... Dave Lippincott
- Re: Numeric field with negative numb... Mark Cameron
