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
d
the 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
doc
The document to which the annotation is added.
pos
A rectangle specifying the annotation’s bounds, specified in user space coordinates.
field_name
The 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
doc
The document to which the annotation is added.
pos
A rectangle specifying the annotation’s bounds, specified in user space coordinates.
field
the 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
value
The option to add
-
Adds multiple options to List Box Widget.
Declaration
Objective-C
- (void)AddOptions:(NSArray<NSString *> *)opts;
Swift
func addOptions(_ opts: [String]!)
Parameters
opts
The 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_opts
The 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_opts
The 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
value
The option to remove.