Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
Statistic
FMM
Blog
Limits textfield to only accept numbers.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
DynaPDF | 6.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
The PDF reference returned from DynaPDF.New. | |||
Field | The field index or field name. | "FirstName" | |
Sep | The decimal separator. Can be CommaDot, NoneDot, DotComma or NoneComma. |
"CommaDot" | |
DecPlaces | Number of decimal places | 2 | |
NegStyle | Negative number format. Can be MinusBlack, Red, ParensBlack or ParensRed. |
"ParensRed" | |
CurrStr | The currency string. Or empty for no currency. |
"€" | Optional |
Prepend | Position of Currency string. Pass 1 to prepend or 0 to append. |
0 | Optional |
Returns OK or error.
See also SetNumberFormat function in DynaPDF manual.
Create field for numbers:
Set Variable [$f; Value:MBS("DynaPDF.CreateTextField"; $pdf; Create Form::Name; -1; Create Form::Multiline; Create Form::MaxLen; Create Form::PosX; Create Form::PosY; Create Form::Width; Create Form::Height)]
Set Variable [$r; Value:MBS("DynaPDF.SetTextFieldValue"; $pdf; $f; Create Form::Value; Create Form::DefaultValue)]
Set Variable [$r; Value:MBS("DynaPDF.SetNumberFormat"; $pdf; $f; "CommaDot"; 2; "Red"; "€"; 0)]
Created 16th August 2016, last changed 16th August 2016
DynaPDF.SetMiterLimit - DynaPDF.SetOCGState
Feedback: Report problem or ask question.