Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
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)]
This function checks for a license.
Created 16th August 2016, last changed 16th August 2016