GemBox.Document
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    FormFieldData Class

    Namespace:
    GemBox.Document
    Assembly:
    GemBox.Document.dll

    Represents a form related data associated with the parent form field within the document.

    • C#
    • VB.NET
    public abstract class FormFieldData
    Public MustInherit Class FormFieldData
    Inheritance:
    System.Object
    FormFieldData
    Derived
    FormCheckBoxData
    FormDropDownData
    FormTextData
    Remarks

    Associated parent form field may be of any of the following types (with the associated FieldType and FormData type in parentheses)

    • Text Box (FormText - FormTextData)
    • Check Box (FormCheckBox - FormCheckBoxData)
    • Drop-down List (FormDropDown - FormDropDownData)

    Properties

    CalculateOnExit

    Gets or sets a value indicating whether the content of all fields within the document shall be recalculated from their field codes when the content of the parent form field is modified.

    • C#
    • VB.NET
    public bool CalculateOnExit { get; set; }
    Public Property CalculateOnExit As Boolean
    Property Value
    System.Boolean

    true if the content of all fields within the document shall be recalculated from their field codes when the content of the parent form field is modified; otherwise, false.

    Enabled

    Gets or sets a value indicating whether the parent form field shall behave as though it is enabled or disabled when it is displayed in the document. Default value is true.

    • C#
    • VB.NET
    public bool Enabled { get; set; }
    Public Property Enabled As Boolean
    Property Value
    System.Boolean

    true if parent form field shall behave as though it is enabled when it is displayed in the document; otherwise, false.

    EntryMacro

    Gets or sets the subroutine in a scripting language which should be executed when the value of the parent form field is entered.

    • C#
    • VB.NET
    public string EntryMacro { get; set; }
    Public Property EntryMacro As String
    Property Value
    System.String

    The subroutine in a scripting language which should be executed when the value or content of the parent form field is entered.

    ExitMacro

    Gets or sets the subroutine in a scripting language which should be executed when the value of the parent form field is exited.

    • C#
    • VB.NET
    public string ExitMacro { get; set; }
    Public Property ExitMacro As String
    Property Value
    System.String

    The subroutine in a scripting language which should be executed when the value of the parent form field is exited.

    Field

    Gets the parent form field.

    • C#
    • VB.NET
    public Field Field { get; }
    Public ReadOnly Property Field As Field
    Property Value
    Field

    The parent form field.

    HelpText

    Gets or sets the optional help text which shall be associated with the parent form field.

    • C#
    • VB.NET
    public string HelpText { get; set; }
    Public Property HelpText As String
    Property Value
    System.String

    The optional help text which shall be associated with the parent form field.

    IsHelpTextAutoEntry

    Gets or sets a value indicating whether HelpText should be interpreted as the name of a glossary document entry whose contents contain the help text.

    • C#
    • VB.NET
    public bool IsHelpTextAutoEntry { get; set; }
    Public Property IsHelpTextAutoEntry As Boolean
    Property Value
    System.Boolean

    true if HelpText should be interpreted as the name of a glossary document entry whose contents contain the help text; otherwise, if HelpText should be interpreted as the literal text for the help text,.

    IsStatusTextAutoEntry

    Gets or sets a value indicating whether StatusText should be interpreted as the name of a glossary document entry whose contents contain the status text.

    • C#
    • VB.NET
    public bool IsStatusTextAutoEntry { get; set; }
    Public Property IsStatusTextAutoEntry As Boolean
    Property Value
    System.Boolean

    true if StatusText should be interpreted as the name of a glossary document entry whose contents contain the status text; otherwise, if StatusText should be interpreted as the literal text for the status text,.

    Name

    Gets or sets the name of the form field.

    • C#
    • VB.NET
    public string Name { get; set; }
    Public Property Name As String
    Property Value
    System.String

    The name of the form field.

    StatusText

    Gets or sets the optional status text which shall be associated with the parent form field.

    • C#
    • VB.NET
    public string StatusText { get; set; }
    Public Property StatusText As String
    Property Value
    System.String

    The optional status text which shall be associated with the parent form field.

    Value

    Gets the value of this form field explicitly set by the user or null, if value was not explicitly set. Type of the value depends on form field type as explained in remarks.

    • C#
    • VB.NET
    public object Value { get; }
    Public ReadOnly Property Value As Object
    Property Value
    System.Object

    The value of this form field explicitly set by the user or null, if value was not explicitly set.

    Remarks

    Type of the value depends on form field type, form field properties (such as TextType) and whether the textual value of form field is parse-able into required type as explained in the following table:

    Form field type (FormFieldData derived type)Form field propertiesValue type
    FORMTEXT (FormTextData)TextType is RegularTextSystem.String
    FORMTEXT (FormTextData)TextType is Number or CalculationSystem.Double
    FORMTEXT (FormTextData)TextType is Date or CurrentDateSystem.DateTime
    FORMTEXT (FormTextData)TextType is CurrentTimeSystem.TimeSpan
    FORMCHECKBOX (FormCheckBoxData)System.Boolean
    FORMDROPDOWN (FormDropDownData)System.String
    If textual value of form field is not parse-able into required type, then textual value is returned.

    ValueOrDefault

    Gets the value of this form field explicitly set by the user or default value, if value was not explicitly set. Type of the value depends on form field type as explained in remarks.

    • C#
    • VB.NET
    public object ValueOrDefault { get; }
    Public ReadOnly Property ValueOrDefault As Object
    Property Value
    System.Object

    The value of this form field explicitly set by the user or default value, if value was not explicitly set.

    Remarks

    Type of the value depends on form field type, form field properties (such as TextType) and whether the textual value of form field is parse-able into required type as explained in the following table:

    Form field type (FormFieldData derived type)Form field propertiesValue type
    FORMTEXT (FormTextData)TextType is RegularTextSystem.String
    FORMTEXT (FormTextData)TextType is Number or CalculationSystem.Double
    FORMTEXT (FormTextData)TextType is Date or CurrentDateSystem.DateTime
    FORMTEXT (FormTextData)TextType is CurrentTimeSystem.TimeSpan
    FORMCHECKBOX (FormCheckBoxData)System.Boolean
    FORMDROPDOWN (FormDropDownData)System.String
    If textual value of form field is not parse-able into required type, then textual value is returned.

    Methods

    Reset()

    Resets the Value of this form field instance.

    • C#
    • VB.NET
    public void Reset()
    Public Sub Reset
    Remarks

    FORMTEXT fields with TextType equal to CurrentDate, CurrentTime and Calculation are currently not reset.

    ToString()

    Returns a System.String that represents this FormFieldData instance.

    • C#
    • VB.NET
    public sealed override string ToString()
    Public NotOverridable Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this FormFieldData instance.

    Overrides
    System.Object.ToString()
    Remarks

    This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).

    Examples

    Update Word Form Controls in C# and VB.NET
    Read Word Form Controls in C# and VB.NET
    Create Word Form Controls in C# and VB.NET
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.