-
Notifications
You must be signed in to change notification settings - Fork 4
/
FormFields.cs
28 lines (26 loc) · 988 Bytes
/
FormFields.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DevExpress.XtraRichEdit.API.Native;
namespace RichEditAPISample.CodeExamples
{
class FormFieldsActions
{
static void InsertChechBox(Document document)
{
#region #InsertCheckBox
DocumentPosition currentPosition = document.CaretPosition;
SubDocument currentDocument = currentPosition.BeginUpdateDocument();
DevExpress.XtraRichEdit.API.Native.CheckBox checkBox = document.FormFields.InsertCheckBox(currentPosition);
checkBox.Name = "check1";
checkBox.State = CheckBoxState.Checked;
checkBox.SizeMode = CheckBoxSizeMode.Auto;
checkBox.HelpTextType = FormFieldTextType.Custom;
checkBox.HelpText = "help text";
currentPosition.EndUpdateDocument(currentDocument);
#endregion #InsertCheckBox
}
}
}