Control edit masking


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

Posted by Grant Foraker on May 03, 2010 at 14:59:52:

Found this in Howto10.IBS.

---------------------------------------------
cosCtlId = IDC.ZIP
gosub COS.AttachMaskedEdit
cosCtlText$ = "#####-####"
Gosub COS.MaskedEditSetMask

cosCtlId = IDC.PHONE
gosub COS.AttachMaskedEdit
cosCtlText$ = "(###) ###-####"
Gosub COS.MaskedEditSetMask

cosCtlId = IDC.CUSTNUM
gosub COS.AttachMaskedEdit
cosCtlText$ = String("#", LEN.CUSTNUM) ! LEN.CUSTNUM is 5.
Gosub COS.MaskedEditSetMask

Set LEN.BALANCES = 9.2 ! #######.##

No example of the "#######.##", but it looks straight forward.
----------------------------------------------------------------
For Customer Tax (4.2), I've been doing ...

InitCustomerTax:
cosCtlId = IDC.EDIT.09
Gosub COS.AttachNumericEdit
coswParam = 2 ! Integer digits
coslParam = 2 ! Fractional digits
Gosub COS.NumEditSetDigits
RETURN

The "MaskedEdit" method is shorter and is easier to read in the source.

See the link for MS documentation.



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):





Each file can be a maximum of 1MB in length Uploaded files will be purged from the server on a regular basis.


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