GetTextPr
Returns the text properties from the current form.
note
Used if possible for this type of form.
Inherited from ApiFormBase.GetTextPr.
Syntax
expression.GetTextPr();
expression - A variable that represents an ApiComboBoxForm class.
Parameters
This method doesn't have any parameters.
Returns
Example
Retrieve the text formatting properties of a combo box form in a document.
// How do I access the text formatting settings of a combo box form in a document?
// Modify the combo box text style by first reading its existing properties and then updating them.
let doc = Api.GetDocument();
let comboBoxForm = Api.CreateComboBoxForm({"key": "Personal information", "tip": "Choose your country", "required": true, "placeholder": "Country", "editable": false, "autoFit": false, "items": ["Latvia", "USA", "UK"]});
let paragraph = doc.GetElement(0);
paragraph.AddElement(comboBoxForm);
let textPr = Api.CreateTextPr();
textPr.SetFontSize(30);
textPr.SetBold(true);
comboBoxForm.SetTextPr(textPr);
let formTextPr = comboBoxForm.GetTextPr();
formTextPr.SetItalic(true);
comboBoxForm.SetTextPr(formTextPr);