We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Checkbox property status is not showing properly on the control property window

Dll Name : Aspose.Words.dll
Version : 15.3.00

Create a document with checkbox control.
Using the following code:

Dim license As Aspose.Words.License = New Aspose.Words.License
Dim fName As String
fName = HttpContext.Current.Server.MapPath("") & "\Temp\Test.DOC"
Dim doc As Aspose.Words.Document = New Aspose.Words.Document(fName)
Dim builder As Aspose.Words.DocumentBuilder = New Aspose.Words.DocumentBuilder(doc)
builder.Font.Color = Drawing.Color.Black
builder.Write("Create Checkbox control True: ")
builder.InsertCheckBox("ChkName", True, 10)
builder.Write("Create Checkbox control False: ")
builder.InsertCheckBox("ChkFalse", False, 10)

Document has been created like the below screenshot
gravatar.png726×574 219 KB
When double click on the first checkbox, It shows the default value ‘Not Checked’ eventhough it is checked,

gravatar.png756×766 244 KB

Hi Tim,

Thanks for your inquiry. I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-11871. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-11871) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi Tim,

Thanks for being patient. It is to update you that the following overload has been added to the DocumentBuilder class:

/// Inserts a checkbox form field at the current position.
If you specify a name for the form field, then a bookmark is automatically created with the same name.
/// The name of the form field. Can be an empty string.
/// Default value of the checkbox form field.
/// Current checked status of the checkbox form field.
/// Specifies the size of the checkbox in points. Specify 0 for MS Word
/// to calculate the size of the checkbox automatically.
/// The form field node that was just inserted.
public FormField InsertCheckBox(string name, bool defaultValue, bool checkedValue, int size)

It allows defining default value and checked state of inserting check box separately. The behavior of the following existing overload is changed.

public FormField InsertCheckBox(string name, bool checkedValue, int size)

Now checkedValue value is also assigned as default value of check box. Default value had the ‘false’ value in the previous version. The checkedValue parameter of the overload has been renamed (old name: defaultValue).

The following new public property has been added to the FormField class to provide ability to set check box default value:

/// Gets or sets the default value of the check box form field.
/// Default value for this property is false.
/// Applicable for a check box form field only.
public bool Default

Please also see Public API Changes in Aspose.Words 15.11.0.

Best regards,

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for .NET 18.12 update and this Aspose.Words for Java 18.12 update.