FormFieldCollection.InsertCheckBox(DocumentPosition) Method
Inserts a CheckBox object at a given document position.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v26.1.Core.dll
NuGet Package: DevExpress.RichEdit.Core
Declaration
Parameters
| Name | Type | Description |
|---|---|---|
| position | DocumentPosition | A DocumentPosition object that is the position within the document to place the checkbox. |
Returns
| Type | Description |
|---|---|
| CheckBox | A CheckBox object that is the target checkbox. |
Remarks
Note
Checkboxes cannot be inserted to the document header,footer, comment or floating objects (text boxes or shapes). Otherwise, an exception occurs.
Example
DocumentPosition currentPosition = server.Document.Range.Start;
DevExpress.XtraRichEdit.API.Native.CheckBox checkBox = server.Document.FormFields.InsertCheckBox(currentPosition);
checkBox.Name = "check1";
checkBox.State = CheckBoxState.Checked;
checkBox.SizeMode = CheckBoxSizeMode.Auto;
checkBox.HelpTextType = FormFieldTextType.Custom;
checkBox.HelpText = "help text";
See Also