PTComboBoxWidget
@interface PTComboBoxWidget : PTWidget
An object representing a combo box used in a PDF Form.
-
Creates a Combo 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 ComboBoxWidget
-
Undocumented
Declaration
Objective-C
- (instancetype)init;
Swift
init!()
-
Creates a new Combo 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 ComboBox widget
Return Value
A newly created blank Combo Box Widget annotation.
-
Creates a new 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 Text widget
Return Value
A newly created blank Widget annotation.
-
Adds an option to Combo Box widget.
Declaration
Objective-C
- (void)AddOption:(NSString *)value;
Swift
func addOption(_ value: String!)
Parameters
value
The option to add
-
Adds multiple options to Combo Box widget.
Declaration
Objective-C
- (void)AddOptions:(NSArray<NSString *> *)opts;
Swift
func addOptions(_ opts: [String]!)
Parameters
opts
The options to add
-
Gets all options of the Combo Box widget.
Declaration
Objective-C
- (NSArray<NSString *> *)GetOptions;
Swift
func getOptions() -> [String]!
Return Value
The options of the Combo Box widget
-
Replaces the current Combo 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.
-
Selects the given option in the Combo Box widget
Declaration
Objective-C
- (void)SetSelectedOption:(NSString *)value;
Swift
func setSelectedOption(_ value: String!)
Parameters
value
The option to select
-
Retrieves the option selected in the ComboBox widget
Declaration
Objective-C
- (NSString *)GetSelectedOption;
Swift
func getSelectedOption() -> String!
Return Value
The option selected in the ComboBox widget
-
Removes the option from Combo Box widget.
Declaration
Objective-C
- (void)RemoveOption:(NSString *)value;
Swift
func removeOption(_ value: String!)
Parameters
value
The option to remove