[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.AcroForms.ComboBoxField

Class ComboBoxField

Namespace
GrapeCity.Documents.Pdf.AcroForms
Assembly
GcDocs.Pdf.dll

Represents the ComboBox field.

public class ComboBoxField : ChoiceField, IPdfDict, IOwnedObject, ActionHide.ILinkedObject, ActionFieldsBase.IFieldDef
Inheritance
object
ComboBoxField
Implements
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Extension Methods

Constructors

ComboBoxField()

Initializes a new instance of the ComboBoxField class.

public ComboBoxField()

Properties

DefaultText

Gets or sets the default value of this ComboBoxField as a string. This property is used to specify the default value of the ComboBoxField if its Editable property is true.

public string DefaultText { get; set; }

Property Value

string

DefaultValue

Gets or sets the default value of ComboBoxField, value is specified as index of selected item.

public int DefaultValue { get; set; }

Property Value

int

Editable

Gets or sets a value indicating whether the combo box includes an editable text box as well as a drop-down list.

public bool Editable { get; set; }

Property Value

bool

Text

Gets or sets the value of this ComboBoxField as a string. This property is used to specify the value of the ComboBoxField if its Editable property is true.

public string Text { get; set; }

Property Value

string

Value

Gets or sets the value of ComboBoxField, value is specified as index of selected item.

public int Value { get; set; }

Property Value

int

Methods

SetDateFormat(string)

Imposes the specified date format string on the current ComboBoxField.

The syntax of the format string is similar to .NET format strings. Some examples are "m/d/yyyy" or "d-mmm-yy".

Note that this method initializes the values of Field.Events.FormatValue and Field.Events.KeyPress only, it does not change the field's value or widget appearance streams.

public void SetDateFormat(string format)

Parameters

format string

The format string. Cannot be null or empty.

SetDateValue(DateTime, string)

Imposes the specified date format string on the current ComboBoxField, and assigns to it the specified value as a date.

The syntax of the format string is similar to .NET format strings. Some examples are "m/d/yyyy" or "d-mmm-yy".

public void SetDateValue(DateTime value, string format)

Parameters

value System.DateTime

The value to assign.

format string

The format string. Cannot be null or empty.

SetNumberFormat(int, NumberSeparatorStyle, NumberNegativeStyle, string, CurrencySymbolStyle)

Imposes the specified numeric formatting options on the current ComboBoxField.

Note that this method initializes the values of Field.Events.FormatValue and Field.Events.KeyPress only, it does not change the field's value or widget appearance streams.

public void SetNumberFormat(int decimalPlaces, Field.NumberSeparatorStyle separatorStyle, Field.NumberNegativeStyle negativeStyle, string currencySymbol, Field.CurrencySymbolStyle currencySymbolStyle)

Parameters

decimalPlaces int

The number of digits that appear to the right of the decimal point. Valid values are from 0 to 10, inclusive.

separatorStyle Field.NumberSeparatorStyle

The placement of commas and periods, see Field.NumberSeparatorStyle.

negativeStyle Field.NumberNegativeStyle

How negative numbers are displayed.

currencySymbol string

The currency symbol, or null or empty string.

currencySymbolStyle Field.CurrencySymbolStyle

The location of the currency symbol in relation to the number. This parameter is meaningful only if currencySymbol is not null or empty.

SetNumberValue(double, int, NumberSeparatorStyle, NumberNegativeStyle, string, CurrencySymbolStyle)

Imposes the specified numeric formatting options on the current ComboBoxField, and assigns to it the specified value as a number.

public void SetNumberValue(double value, int decimalPlaces, Field.NumberSeparatorStyle separatorStyle, Field.NumberNegativeStyle negativeStyle, string currencySymbol, Field.CurrencySymbolStyle currencySymbolStyle)

Parameters

value double

The value to assign.

decimalPlaces int

The number of digits that appear to the right of the decimal point. Valid values are from 0 to 10, inclusive.

separatorStyle Field.NumberSeparatorStyle

The placement of commas and periods, see Field.NumberSeparatorStyle.

negativeStyle Field.NumberNegativeStyle

How negative numbers are displayed.

currencySymbol string

The currency symbol, or null or empty string.

currencySymbolStyle Field.CurrencySymbolStyle

The location of the currency symbol in relation to the number. This parameter is meaningful only if currencySymbol is not null or empty.

SetPercentFormat(int, NumberSeparatorStyle)

Imposes the specified percentage formatting options on the current ComboBoxField.

Note that this method initializes the values of Field.Events.FormatValue and Field.Events.KeyPress only, it does not change the field's value or widget appearance streams.

public void SetPercentFormat(int decimalPlaces, Field.NumberSeparatorStyle separatorStyle)

Parameters

decimalPlaces int

The number of digits that appear to the right of the decimal point. Valid values are from 0 to 10, inclusive.

separatorStyle Field.NumberSeparatorStyle

The placement of commas and periods, see Field.NumberSeparatorStyle.

SetPercentValue(double, int, NumberSeparatorStyle)

Imposes the specified percentage formatting options on the current ComboBoxField, and assigns to it the specified value as percentage.

public void SetPercentValue(double value, int decimalPlaces, Field.NumberSeparatorStyle separatorStyle)

Parameters

value double

The percentage value to assign. For example, 1 corresponds to 100%, 0.5 to 50%, and so on.

decimalPlaces int

The number of digits that appear to the right of the decimal point. Valid values are from 0 to 10, inclusive.

separatorStyle Field.NumberSeparatorStyle

The placement of commas and periods.

SetSpecialFormat(SpecialFormat)

Imposes the specified special format on the current ComboBoxField.

Note that this method initializes the values of Field.Events.FormatValue and Field.Events.KeyPress only, it does not change the field's value or widget appearance streams.

public void SetSpecialFormat(Field.SpecialFormat specialFormat)

Parameters

specialFormat Field.SpecialFormat

The special format to use.

SetSpecialFormatValue(string, SpecialFormat)

Sets the value of the current ComboBoxField as a value formatted according to format.

This method assumes that value is already formatted as required. E.g. if format is SSN, value should look like "123-45-6789".

public void SetSpecialFormatValue(string value, Field.SpecialFormat format)

Parameters

value string

The value to assign.

format Field.SpecialFormat

The special format to use.

SetTimeFormat(string)

Imposes the specified time format string on the current ComboBoxField.

The syntax of the format string is similar to .NET format strings. Some examples are "HH:MM" or "H:MM tt".

Note that this method initializes the values of Field.Events.FormatValue and Field.Events.KeyPress only, it does not change the field's value or widget appearance streams.

public void SetTimeFormat(string format)

Parameters

format string

The format string. Cannot be null or empty.

SetTimeValue(DateTime, string)

Imposes the specified time format string on the current ComboBoxField, and assigns to it the specified value as time.

The syntax of the format string is similar to .NET format strings. Some examples are "HH:MM" or "H:MM tt".

public void SetTimeValue(DateTime value, string format)

Parameters

value System.DateTime

The value to assign.

format string

The format string. Cannot be null or empty.