GetPlaceholderText
返回当前表单的占位符文本。
继承自 ApiFormBase.GetPlaceholderText。
语法
expression.GetPlaceholderText();
expression - 表示 ApiComboBoxForm 类的变量。
参数
此方法没有任何参数。
返回值
string
示例
读取文档中组合框表单内显示的占位符文本。
// How do I find out what placeholder text a combo box form displays in a document?
// Confirm the instructional hint text is set correctly by reading it back from the form.
let doc = Api.GetDocument();
let comboBoxForm = Api.CreateComboBoxForm({"key": "Personal information", "tip": "Choose your country", "required": true, "editable": false, "autoFit": false, "items": ["Latvia", "USA", "UK"]});
let paragraph = doc.GetElement(0);
paragraph.AddElement(comboBoxForm);
comboBoxForm.SetPlaceholderText("Country");
let placeholderText = comboBoxForm.GetPlaceholderText();
paragraph = Api.CreateParagraph();
paragraph.AddText("Placeholder text: " + placeholderText);
doc.Push(paragraph);