FormFieldCollection.InsertCheckBox(DocumentPosition) Method
Inserts a CheckBox object at a given document position.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v24.2.Core.dll
NuGet Package: DevExpress.RichEdit.Core
#Declaration
CheckBox InsertCheckBox(
DocumentPosition position
)
#Parameters
Name | Type | Description |
---|---|---|
position | Document |
A Document |
#Returns
Type | Description |
---|---|
Check |
A Check |
#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";
#Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the InsertCheckBox(DocumentPosition) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.