PTListBoxWidget
@interface PTListBoxWidget : PTWidget
An object representing a List Box used in a PDF Form.
-
Creates a List Box Widget annotation and initialize it using given Cos/SDF object.
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
Parameters
dthe object to use to initialize the List Box Widget
-
Undocumented
Declaration
Objective-C
- (instancetype)init;Swift
init!() -
Creates a new List Box Widget annotation, in the specified document.
Declaration
Parameters
docThe document to which the annotation is added.
posA rectangle specifying the annotation’s bounds, specified in user space coordinates.
field_nameThe name of the field for which to create a List Box Widget
Return Value
A newly created blank List Box Widget annotation.
-
Creates a new List Box Widget annotation, in the specified document.
Declaration
Parameters
docThe document to which the annotation is added.
posA rectangle specifying the annotation’s bounds, specified in user space coordinates.
fieldthe field for which to create a List Box Widget
Return Value
A newly created blank List Box Widget annotation.
-
Adds option to List Box Widget.
Declaration
Objective-C
- (void)AddOption:(NSString *)value;Swift
func addOption(_ value: String!)Parameters
valueThe option to add
-
Adds multiple options to List Box Widget.
Declaration
Objective-C
- (void)AddOptions:(NSArray<NSString *> *)opts;Swift
func addOptions(_ opts: [String]!)Parameters
optsThe options to add.
-
Sets the options for the ListBox widget.
Declaration
Objective-C
- (void)SetSelectedOptions:(NSArray<NSString *> *)selected_opts;Swift
func setSelectedOptions(_ selected_opts: [String]!)Parameters
selected_optsThe options to select.
-
Gets all selected options in the List Box widget.
Declaration
Objective-C
- (NSArray<NSString *> *)GetSelectedOptions;Swift
func getSelectedOptions() -> [String]!Return Value
The selected options of the List Box widget
-
Gets all options of the List Box widget.
Declaration
Objective-C
- (NSArray<NSString *> *)GetOptions;Swift
func getOptions() -> [String]!Return Value
The options of the List Box widget
-
Replaces the current List Box widget options with a new set.
Declaration
Objective-C
- (void)ReplaceOptions:(NSArray<NSString *> *)new_opts;Swift
func replaceOptions(_ new_opts: [String]!)Parameters
new_optsThe new set of options to use.
-
Removes the option from List Box widget.
Declaration
Objective-C
- (void)RemoveOption:(NSString *)value;Swift
func removeOption(_ value: String!)Parameters
valueThe option to remove.
PTListBoxWidget Class Reference