SetFormFieldNumberFormat
表單欄位
描述
此頁面描述 PDF Library for Delphi 在「表單欄位」主題下的 SetFormFieldNumberFormat。API 名稱、參數、類別名稱、檔案名稱與字面量(literals)皆完全保留其在 Delphi 程式庫與 DLL 進入點中的原始樣貌。
在呼叫此函數前,請檢閱其語法、參數與傳回值。
語法
Delphi
Function TPDFlib.SetFormFieldNumberFormat(Index, Decimals, SepStyle, NegStyle: Integer; Const CurrencyText: WideString; CurrencyPrepend: Integer): Integer;
參數
Index 是 1-based 的欄位索引。Decimals (0..10) 設定顯示的小數位數。SepStyle:0 = 1,234.56;1 = 1234.56;2 = 1.234,56;3 = 1234,56。NegStyle:0 = 減號;1 = 紅色;2 = 括號;3 = 紅色括號。CurrencyText 是貨幣符號;CurrencyPrepend 傳入 1 會將其置於數字之前,傳入 0 則置於數字之後。
傳回值
成功時傳回 1;若欄位不存在或選擇器超出範圍,則傳回 0。
備註
將標準的 Acrobat 格式化配對 AFNumber_Keystroke/AFNumber_Format 寫入欄位的額外動作(/K 與 /F)中,因此相容的檢視器會過濾鍵盤輸入並渲染格式化的值。