Numeric Edit Control


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]

Posted by Mike Saunders on December 20, 2007 at 11:10:21:

Been playing with the Numeric Edit Control.
cos.CreateNumericEdit

From HOWTO5 I found....
coswParam = NE.PadWithZerosAfterDecimal + NE.AddDecimalAfterMaxWholeDigits

Where are the SET's for the NE.'s at ? I have not been able to locate them in any of the .INC files yet.

What are the above ones supposed to do, I've tried them with and without with no visible changes.


coswParam = 12 ! Integer digits
coslParam = 4 ! Fractional digits
Gosub COS.NumEditSetDigits

Should the above not allow more than 4 digits to be entered after the decimal? If so, does not seem to be working for me.

MakeNumericEditControl:
cosCtlId = IDC.FIRSTEDIT
FirstEdit.Text$ = "-123456789012"
cosRow = 1 * 100
cosCol = ((POPUP.WIDTH * 100) / 120) * 3
cosWidth = ((POPUP.WIDTH * 100) / 120 ) * 122
cosHeight = 125
! cosStyle = WS.CHILD + WS.VISIBLE + WS.GROUP + WS.TABSTOP + ES.AUTOHSCROLL + ES.READONLY + ES.NUMBER + ES.RIGHT
cosStyle = WS.CHILD + WS.VISIBLE + WS.GROUP + WS.TABSTOP + ES.NUMBER + ES.RIGHT
cosExStyle = WS.EX.CLIENTEDGE
cosDlgFlags = 0
! gosub cos.CreateEdit
gosub cos.CreateNumericEdit
Gosub COS.AttachNumericEdit
! coswParam = NE.PadWithZerosAfterDecimal + NE.AddDecimalAfterMaxWholeDigits
! coswParam = NE.AddDecimalAfterMaxWholeDigits
coswParam = 0
coslParam = 0 ! nothing to reset
Gosub COS.NumEditSetFlags
coswParam = 12 ! Integer digits
coslParam = 4 ! Fractional digits
Gosub COS.NumEditSetDigits
gosub SET.FirstEditText
Return

SET.FirstEditText:
! cosDlghDlg$ should be already set
cosCtlText$ = FIRSTEDIT.TEXT$
cosCtlId = IDC.FIRSTEDIT
gosub COS.SetDlgItemText
Return



Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

What is the name of the main Signature System's Product?

Comments:

Optional Link URL:
Link Title:
Optional Image URL:

You may attach up to 5 files to your followup (see below):






[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ]