SetCharactersLimit

SetCharactersLimit(nChars)+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

设置文本字段字符限制

参数:

名称 类型 描述性
夏尔斯 数组

最大字符数文本字段如果参数等于-1,则不设限字符串应用时需要设置限值最大值为1000

返回时间 :

类型
布林安

实例

拷贝代码
builder.CreateFile("docx")!varoDocuments=api.GetDocumentvarOTextForm = Api.CreateTextForm({{ivarolements=ODocument.GetEplement0oParagraph.AddElement(oTextForm)!oTextForm.SetCharactersLimit(5)!oTextForm.SetText("John Smith")!varnLimit=OTextForm.GetCharactersLimitodeptes = Api.Createlementsodision.adText (charctiers限值:+nlioDocument.Push(oParagraph)!builder.SaveFile("docx", "SetCharactersLimit.docx")!builder.CloseFile();

结果文档