The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

FormFieldCollection.InsertCheckBox(DocumentPosition) Method

Inserts a CheckBox object at a given document position.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v19.1.Core.dll

Declaration

CheckBox InsertCheckBox(
    DocumentPosition position
)
Function InsertCheckBox(
    position As DocumentPosition
) As CheckBox
CheckBox InsertCheckBox(
    DocumentPosition position
)
Function InsertCheckBox(
    position As DocumentPosition
) As CheckBox

Parameters

Name Type Description
position DocumentPosition

A DocumentPosition object that is the position within the document to place the checkbox.

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.

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.

Examples

The following code sample shows how to create a checkbox on a caret's position:

Dim currentPosition As DocumentPosition = document.CaretPosition
Dim checkBox As DevExpress.XtraRichEdit.API.Native.CheckBox = 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