Foxit PDF SDK

Public Member Functions | Static Public Attributes | List of all members
FoxitPDFSDKPython3.XFAWidget Class Reference
Inheritance diagram for FoxitPDFSDKPython3.XFAWidget:

## Public Member Functions
def | XFAWidget (other)
| Constructor, with another XFA widget object. More...
def | GetBitmap ()
| Get the bitmap of current XFA widget. More...
def | GetDefaultValue ()
| Get the default value string. More...
def | GetHAlign ()
| Get text horizontal alignment. More...
def | GetIndex ()
| Get the index of XFA Widget in related XFA page. More...
def | GetJavaScript ()
| Get the JavaScript of validation for current XFA widget. More...
def | GetName (type)
| Get Widget name. More...
def | GetOptions ()
| Get options of a choice list or an Exclusion Group (for radio button only). More...
def | GetPresence ()
| Get the presence property of the XFA widget. More...
def | GetRect ()
| Get rectangle of XFA widget. More...
def | GetSignature ()
| Get the signature object from current XFA widget. More...
def | GetToolTip ()
| Get tooltip string. More...
def | GetType ()
| Get type of XFA widget. More...
def | GetVAlign ()
| Get text vertical alignment. More...
def | GetValue ()
| Get the value string. More...
def | GetXFAPage ()
| Get the related XFA page, to which current XFA widget belongs. More...
def | GetXMLContent ()
| Get the xml content of current XFA widget. More...
def | HasEdge (edge_pos)
| Check if the edge for specified position exists. More...
def | IsAllowRichText ()
| Check whether the widget allows rich text formatting. More...
def | IsChecked ()
| Check if current XFA widget is checked. More...
def | IsEmpty ()
| Check whether current object is empty or not. More...
def | IsListBox ()
| Check whether the widget is listbox or not. More...
def | IsReadOnly ()
| Check whether the widget is read only. More...
def | IsRequired ()
| Check whether the widget requires a value at the time it is exported by a submit-form action. More...
def | IsSupportMultiline ()
| Check whether the widget supports multiple lines. More...
def | IsSupportMultiSelect ()
| Check whether the widget supports multiple selections. More...
def | OnChar (input_char, flags)
| Call this function when a character code is being input. More...
def | OnHitTest (point)
| Call this function to do hit test for a specified point. More...
def | OnKeyDown (key_code, flags)
| Call this function when key on the keyboard is down. More...
def | OnKeyUp (key_code, flags)
| Call this function when key on the keyboard is up. More...
def | OnLButtonDoubleClick (point, flags)
| Call this function when left mouse button is double-clicked . More...
def | OnLButtonDown (point, flags)
| Call this function when left mouse button is down. More...
def | OnLButtonUp (point, flags)
| Call this function when left mouse button is up. More...
def | OnMouseEnter ()
| Call this function when mouse enters current XFA widget. More...
def | OnMouseExit ()
| Call this function when mouse exits. More...
def | OnMouseMove (point, flags)
| Call this function when mouse moves. More...
def | OnRButtonDown (point, flags)
| Call this function when right mouse is down. More...
def | OnRButtonUp (point, flags)
| Call this function when right button is up. More...
def | ResetData ()
| Reset XFA Widget Data. More...
def | SetCheckState (is_checked)
| Set the checked state of the current XFA widget. More...
def | SetDefaultValue (value)
| Set the default value string. More...
def | SetImage (image)
| Set the image for current XFA widget. More...
def | SetOptions (option_array)
| Set options of a choice list or an Exclusion Group (for radio button only). More...
def | SetValue (value)
| Set the value string. More...
def | ValidateValue (value, format)
| Validate whether the value conforms to the format of current XFA widget. More...

## Static Public Attributes
| e_HitTestAreaClient = _fsdk.XFAWidget_e_HitTestAreaClient
| Hit test area: Client.
| e_HitTestAreaHyperLink = _fsdk.XFAWidget_e_HitTestAreaHyperLink
| Hit test area: HyperLink.
| e_HitTestAreaTitleBar = _fsdk.XFAWidget_e_HitTestAreaTitleBar
| Hit test area: Title Bar.
| e_HitTestAreaUnknown = _fsdk.XFAWidget_e_HitTestAreaUnknown
| Hit test area: Unknown.
| e_PresenceHidden = _fsdk.XFAWidget_e_PresenceHidden
| Presence property: Hidden. Participate in interaction but not layout or rendering.
| e_PresenceInactive = _fsdk.XFAWidget_e_PresenceInactive
| Presence property: Inactive. Do not participate in interaction, layout, or rendering.
| e_PresenceInvisible = _fsdk.XFAWidget_e_PresenceInvisible
| Presence property: Invisible. Participate in interaction and layout but not rendering.
| e_PresenceUnknown = _fsdk.XFAWidget_e_PresenceUnknown
| Presence property: Unknown.
| e_PresenceVisible = _fsdk.XFAWidget_e_PresenceVisible
| Presence property: Visible. Participate in interaction, layout, and rendering.
| e_WidgetEdgePositionBottom = _fsdk.XFAWidget_e_WidgetEdgePositionBottom
| Edge position: bottom.
| e_WidgetEdgePositionLeft = _fsdk.XFAWidget_e_WidgetEdgePositionLeft
| Edge position: left.
| e_WidgetEdgePositionRight = _fsdk.XFAWidget_e_WidgetEdgePositionRight
| Edge position: right.
| e_WidgetEdgePositionTop = _fsdk.XFAWidget_e_WidgetEdgePositionTop
| Edge position: top.
| e_WidgethAlignTypeCenter = _fsdk.XFAWidget_e_WidgethAlignTypeCenter
| Center the text horizontally within the available region.
| e_WidgethAlignTypeJustify = _fsdk.XFAWidget_e_WidgethAlignTypeJustify
| Left-align the last line and spread-justify the rest.
| e_WidgethAlignTypeJustifyAll = _fsdk.XFAWidget_e_WidgethAlignTypeJustifyAll
| Spread-justify all lines to fill the available region.
| e_WidgethAlignTypeLeft = _fsdk.XFAWidget_e_WidgethAlignTypeLeft
| Align the text to the left edge of the available region.
| e_WidgethAlignTypeRadix = _fsdk.XFAWidget_e_WidgethAlignTypeRadix
| Align the radix indicator.
| e_WidgethAlignTypeRight = _fsdk.XFAWidget_e_WidgethAlignTypeRight
| Align the text to the right edge of the available region.
| e_WidgetNameTypeCaption = _fsdk.XFAWidget_e_WidgetNameTypeCaption
| Name type: caption name. Name in this type will be retrieved from caption entry.
| e_WidgetNameTypeField = _fsdk.XFAWidget_e_WidgetNameTypeField
| Name type: field name. Name in this type will be retrieved from XFA widget's name entry and this may an empty string.
| e_WidgetNameTypeFullName = _fsdk.XFAWidget_e_WidgetNameTypeFullName
| Name type: full name.
| e_WidgetTypeArc = _fsdk.XFAWidget_e_WidgetTypeArc
| XFA widget type: arc.
| e_WidgetTypeBarcode = _fsdk.XFAWidget_e_WidgetTypeBarcode
| XFA widget type: barcode.
| e_WidgetTypeCheckButton = _fsdk.XFAWidget_e_WidgetTypeCheckButton
| XFA widget type: check button.
| e_WidgetTypeChoiceList = _fsdk.XFAWidget_e_WidgetTypeChoiceList
| XFA widget type: choice list.
| e_WidgetTypeDateTimeEdit = _fsdk.XFAWidget_e_WidgetTypeDateTimeEdit
| XFA widget type: date time edit.
| e_WidgetTypeExclGroup = _fsdk.XFAWidget_e_WidgetTypeExclGroup
| XFA widget type: Exclusion Group for radio button only.
| e_WidgetTypeImage = _fsdk.XFAWidget_e_WidgetTypeImage
| XFA widget type: image.
| e_WidgetTypeImageEdit = _fsdk.XFAWidget_e_WidgetTypeImageEdit
| XFA widget type: image edit.
| e_WidgetTypeLine = _fsdk.XFAWidget_e_WidgetTypeLine
| XFA widget type: line.
| e_WidgetTypeNumericEdit = _fsdk.XFAWidget_e_WidgetTypeNumericEdit
| XFA widget type: numeric edit.
| e_WidgetTypePasswordEdit = _fsdk.XFAWidget_e_WidgetTypePasswordEdit
| XFA widget type: password edit.
| e_WidgetTypePushButton = _fsdk.XFAWidget_e_WidgetTypePushButton
| XFA widget type: push button.
| e_WidgetTypeRadioButton = _fsdk.XFAWidget_e_WidgetTypeRadioButton
| XFA widget type: radio button.
| e_WidgetTypeRectangle = _fsdk.XFAWidget_e_WidgetTypeRectangle
| XFA widget type: rectangle.
| e_WidgetTypeSignature = _fsdk.XFAWidget_e_WidgetTypeSignature
| XFA widget type: signature.
| e_WidgetTypeTextEdit = _fsdk.XFAWidget_e_WidgetTypeTextEdit
| XFA widget type: text edit.
| e_WidgetTypeUnknown = _fsdk.XFAWidget_e_WidgetTypeUnknown
| XFA widget type: unknown.
| e_WidgetvAlignTypeBottom = _fsdk.XFAWidget_e_WidgetvAlignTypeBottom
| Align the text to the bottom of the available region.
| e_WidgetvAlignTypeMiddle = _fsdk.XFAWidget_e_WidgetvAlignTypeMiddle
| Align the text so that it is centered between the top and bottom of the available region.
| e_WidgetvAlignTypeTop = _fsdk.XFAWidget_e_WidgetvAlignTypeTop
| Align the text to the top of the available region.

## Detailed Description

Class XFAWidget represents the XFA widget which is retrieved from XFA page object.
To access the menu of XFA widget, please construct a FoxitPDFSDKPython3.WidgetMenu object with XFAWidget object.

See also
  WidgetMenu

## Constructor & Destructor Documentation

## ◆ XFAWidget()

def FoxitPDFSDKPython3.XFAWidget.XFAWidget | ( |  | other | ) |

Constructor, with another XFA widget object.

Parameters

  [in] | other | Another XFA widget object.

## Member Function Documentation

## ◆ GetBitmap()

def FoxitPDFSDKPython3.XFAWidget.GetBitmap | ( |  | ) |

Get the bitmap of current XFA widget.

Applicable only when the type of current XFA widget is FoxitPDFSDKPython3.XFAWidget.e_WidgetTypeImageEdit or FoxitPDFSDKPython3.XFAWidget.e_WidgetTypeImage . For types that are not applicable, this function will throw exception FoxitPDFSDKPython3.e_ErrUnsupported .

Returns
  The bitmap of current XFA widget.

## ◆ GetDefaultValue()

def FoxitPDFSDKPython3.XFAWidget.GetDefaultValue | ( |  | ) |

Get the default value string.

Returns
  The default value string.

## ◆ GetHAlign()

def FoxitPDFSDKPython3.XFAWidget.GetHAlign | ( |  | ) |

Get text horizontal alignment.

Returns
  Text horizontal alignment. Please refer to values starting from FoxitPDFSDKPython3.XFAWidget.e_WidgethAlignTypeLeft and this would be one of these values.

## ◆ GetIndex()

def FoxitPDFSDKPython3.XFAWidget.GetIndex | ( |  | ) |

Get the index of XFA Widget in related XFA page.

Returns
  The index of XFA Widget in related XFA page.

## ◆ GetJavaScript()

def FoxitPDFSDKPython3.XFAWidget.GetJavaScript | ( |  | ) |

Get the JavaScript of validation for current XFA widget.

Returns
  The JavaScript of validation for current XFA widget.

## ◆ GetName()

def FoxitPDFSDKPython3.XFAWidget.GetName | ( |  | type | ) |

Get Widget name.

Parameters

  [in] | type | Name type. Please refer to values starting from FoxitPDFSDKPython3.XFAWidget.e_WidgetNameTypeField and this should be one of these values.

Returns
  Widget name string.

## ◆ GetOptions()

def FoxitPDFSDKPython3.XFAWidget.GetOptions | ( |  | ) |

Get options of a choice list or an Exclusion Group (for radio button only).

Applicable for choice list and Exclusion Group (for radio button only). For types that are not applicable, this function will return an empty array.

Returns
  A choice option array.

## ◆ GetPresence()

def FoxitPDFSDKPython3.XFAWidget.GetPresence | ( |  | ) |

Get the presence property of the XFA widget.

The presence property controls the participation of the associated object in different phases of processing.

Returns
  The presence property of the XFA widget.

## ◆ GetRect()

def FoxitPDFSDKPython3.XFAWidget.GetRect | ( |  | ) |

Get rectangle of XFA widget.

Widget rectangle is defined in XFA coordinate. XFA coordinate is defined as original point in left top, x-axis pointing to right and y-axis pointing down.

Returns
  The rectangle of XFA widget.

## ◆ GetSignature()

def FoxitPDFSDKPython3.XFAWidget.GetSignature | ( |  | ) |

Get the signature object from current XFA widget.

Applicable only when current XFA widget represents a signature. For types that are not applicable, this function will throw exception FoxitPDFSDKPython3.e_ErrUnsupported .

Returns
  A signature object.

## ◆ GetToolTip()

def FoxitPDFSDKPython3.XFAWidget.GetToolTip | ( |  | ) |

Get tooltip string.

Returns
  Tooltip string.

## ◆ GetType()

def FoxitPDFSDKPython3.XFAWidget.GetType | ( |  | ) |

Get type of XFA widget.

Returns
  The XFA widget type. Please refer to values starting from FoxitPDFSDKPython3.XFAWidget.e_WidgetTypeBarcode and this would be one of these values.

## ◆ GetVAlign()

def FoxitPDFSDKPython3.XFAWidget.GetVAlign | ( |  | ) |

Get text vertical alignment.

Returns
  Text vertical alignment. Please refer to values starting from FoxitPDFSDKPython3.XFAWidget.e_WidgetvAlignTypeTop and this would be one of these values.

## ◆ GetValue()

def FoxitPDFSDKPython3.XFAWidget.GetValue | ( |  | ) |

Get the value string.

Returns
  The value string.

## ◆ GetXFAPage()

def FoxitPDFSDKPython3.XFAWidget.GetXFAPage | ( |  | ) |

Get the related XFA page, to which current XFA widget belongs.

Returns
  An XFA page object.

## ◆ GetXMLContent()

def FoxitPDFSDKPython3.XFAWidget.GetXMLContent | ( |  | ) |

Get the xml content of current XFA widget.

Returns
  The xml content of current XFA widget.

## ◆ HasEdge()

def FoxitPDFSDKPython3.XFAWidget.HasEdge | ( |  | edge_pos | ) |

Check if the edge for specified position exists.

Parameters

  [in] | edge_pos | Edge position to specify which edge will be checked. Please refer to values starting from FoxitPDFSDKPython3.XFAWidget.e_WidgetEdgePositionTop and this should be one of these values.

Returns
  true means that the edge for specified position exists, while false means that no such edge exist.

## ◆ IsAllowRichText()

def FoxitPDFSDKPython3.XFAWidget.IsAllowRichText | ( |  | ) |

Check whether the widget allows rich text formatting.

Only text edit widget which type is FoxitPDFSDKPython3.XFAWidget.e_WidgetTypeTextEdit supports rich text.

Returns
  true means the widget allows rich text formatting, while false means not.

## ◆ IsChecked()

def FoxitPDFSDKPython3.XFAWidget.IsChecked | ( |  | ) |

Check if current XFA widget is checked.

Applicable for check box or radio button as related XFA widget. For types that are not applicable, this function will return false.

Returns
  true means checked, while false means unchecked or failure.

## ◆ IsEmpty()

def FoxitPDFSDKPython3.XFAWidget.IsEmpty | ( |  | ) |

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
  true means current object is empty, while false means not.

## ◆ IsListBox()

def FoxitPDFSDKPython3.XFAWidget.IsListBox | ( |  | ) |

Check whether the widget is listbox or not.

Returns
  true means the widget is listbox, while false means not.

## ◆ IsReadOnly()

def FoxitPDFSDKPython3.XFAWidget.IsReadOnly | ( |  | ) |

Check whether the widget is read only.

Returns
  true means the value of the field can not be changed, while false means it can be changed.

## ◆ IsRequired()

def FoxitPDFSDKPython3.XFAWidget.IsRequired | ( |  | ) |

Check whether the widget requires a value at the time it is exported by a submit-form action.

Returns
  true means the field must have a value at the time it is exported by a submit-form action, while false means not.

## ◆ IsSupportMultiline()

def FoxitPDFSDKPython3.XFAWidget.IsSupportMultiline | ( |  | ) |

Check whether the widget supports multiple lines.

Only text edit widget which type is FoxitPDFSDKPython3.XFAWidget.e_WidgetTypeTextEdit supports multiple lines.

Returns
  true means the widget supports multiple lines, while false means not.

## ◆ IsSupportMultiSelect()

def FoxitPDFSDKPython3.XFAWidget.IsSupportMultiSelect | ( |  | ) |

Check whether the widget supports multiple selections.

Only the list box widget supports multiline selections, whose type is FoxitPDFSDKPython3.XFAWidget.e_WidgetTypeChoiceList and the return value of function FoxitPDFSDKPython3.XFAWidget.IsListBox is true.

Returns
  true means the widget support multiple selections, while false means not.

## ◆ OnChar()

def FoxitPDFSDKPython3.XFAWidget.OnChar | ( |  | input_char,
|  |  | flags
| ) |  |

Call this function when a character code is being input.

Parameters

  [in] | input_char | A character code, in UTF16-LE encoding.
  [in] | flags | Event flags. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.

Returns
  true means success, while false means failure.

## ◆ OnHitTest()

def FoxitPDFSDKPython3.XFAWidget.OnHitTest | ( |  | point | ) |

Call this function to do hit test for a specified point.

Parameters

  [in] | point | A point to be tested.

Returns
  The hit test area. Please refer to values starting from FoxitPDFSDKPython3.XFAWidget.e_HitTestAreaUnknown and this would be one of these values.

## ◆ OnKeyDown()

def FoxitPDFSDKPython3.XFAWidget.OnKeyDown | ( |  | key_code,
|  |  | flags
| ) |  |

Call this function when key on the keyboard is down.

Parameters

  [in] | key_code | The key code. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_VkeyUnknown and this should be one of these values.
  [in] | flags | Event flags. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.

Returns
  true means success, while false means failure.

## ◆ OnKeyUp()

def FoxitPDFSDKPython3.XFAWidget.OnKeyUp | ( |  | key_code,
|  |  | flags
| ) |  |

Call this function when key on the keyboard is up.

Parameters

  [in] | key_code | The key code. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_VkeyUnknown and this should be one of these values.
  [in] | flags | Event flags. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.

Returns
  true means success, while false means failure.

## ◆ OnLButtonDoubleClick()

def FoxitPDFSDKPython3.XFAWidget.OnLButtonDoubleClick | ( |  | point,
|  |  | flags
| ) |  |

Call this function when left mouse button is double-clicked .

Parameters

  [in] | point | A point where left mouse button is double-clicked in XFA page, in PDF coordinate system.
  [in] | flags | Event flags. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.

Returns
  true means success, while false means failure.

## ◆ OnLButtonDown()

def FoxitPDFSDKPython3.XFAWidget.OnLButtonDown | ( |  | point,
|  |  | flags
| ) |  |

Call this function when left mouse button is down.

Parameters

  [in] | point | A point where left mouse button is down in XFA page, in PDF coordinate system.
  [in] | flags | Event flags. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.

Returns
  true means success, while false means failure.

## ◆ OnLButtonUp()

def FoxitPDFSDKPython3.XFAWidget.OnLButtonUp | ( |  | point,
|  |  | flags
| ) |  |

Call this function when left mouse button is up.

Parameters

  [in] | point | A point where left mouse button is up in XFA page, in PDF coordinate system.
  [in] | flags | Event flags. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.

Returns
  true means success, while false means failure.

## ◆ OnMouseEnter()

def FoxitPDFSDKPython3.XFAWidget.OnMouseEnter | ( |  | ) |

Call this function when mouse enters current XFA widget.

Returns
  true means success, while false means failure.

## ◆ OnMouseExit()

def FoxitPDFSDKPython3.XFAWidget.OnMouseExit | ( |  | ) |

Call this function when mouse exits.

Returns
  true means success, while false means failure.

## ◆ OnMouseMove()

def FoxitPDFSDKPython3.XFAWidget.OnMouseMove | ( |  | point,
|  |  | flags
| ) |  |

Call this function when mouse moves.

Parameters

  [in] | point | A point where left mouse button moves in XFA page, in PDF coordinate system.
  [in] | flags | Event flags. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.

Returns
  true means success, while false means failure.

## ◆ OnRButtonDown()

def FoxitPDFSDKPython3.XFAWidget.OnRButtonDown | ( |  | point,
|  |  | flags
| ) |  |

Call this function when right mouse is down.

Parameters

  [in] | point | A point where right mouse button is down in XFA page, in PDF coordinate system.
  [in] | flags | Event flags. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.

Returns
  true means success, while false means failure.

## ◆ OnRButtonUp()

def FoxitPDFSDKPython3.XFAWidget.OnRButtonUp | ( |  | point,
|  |  | flags
| ) |  |

Call this function when right button is up.

Parameters

  [in] | point | A point where right mouse button is up in XFA page, in PDF coordinate system.
  [in] | flags | Event flags. Please refer to values starting from FoxitPDFSDKPython3.Filler.e_EventFlagShiftKey and this should be one or a combination of these values.

Returns
  true means success, while false means failure.

## ◆ ResetData()

def FoxitPDFSDKPython3.XFAWidget.ResetData | ( |  | ) |

Reset XFA Widget Data.

Returns
  None.

## ◆ SetCheckState()

def FoxitPDFSDKPython3.XFAWidget.SetCheckState | ( |  | is_checked | ) |

Set the checked state of the current XFA widget.

Applicable for check box or radio button as related XFA widget. For types that are not applicable, this function will throw exception FoxitPDFSDKPython3.e_ErrUnsupported .

Parameters

  [in] | is_checked | true means the current XFA widget will be checked, while false means it will not be checked.

Returns
  None.

## ◆ SetDefaultValue()

def FoxitPDFSDKPython3.XFAWidget.SetDefaultValue | ( |  | value | ) |

Set the default value string.

It is only useful for the XFA widget which type is FoxitPDFSDKPython3.XFAWidget.e_WidgetTypeTextEdit , FoxitPDFSDKPython3.XFAWidget.e_WidgetTypeNumericEdit , FoxitPDFSDKPython3.XFAWidget.e_WidgetTypePasswordEdit or FoxitPDFSDKPython3.XFAWidget.e_WidgetTypeDateTimeEdit .

Parameters

  [in] | value | A string as default value to be set. It can be an empty string.

Returns
  None.

## ◆ SetImage()

def FoxitPDFSDKPython3.XFAWidget.SetImage | ( |  | image | ) |

Set the image for current XFA widget.

Applicable only when the type of current XFA widget is FoxitPDFSDKPython3.XFAWidget.e_WidgetTypeImageEdit . For types that are not applicable, this function will throw exception FoxitPDFSDKPython3.e_ErrUnsupported .

Parameters

  [in] | image | An image will be set to current XFA widget. Currently, this function only supports the following image types: FoxitPDFSDKPython3.Image.e_BMP FoxitPDFSDKPython3.Image.e_PNG FoxitPDFSDKPython3.Image.e_JPG FoxitPDFSDKPython3.Image.e_GIF FoxitPDFSDKPython3.Image.e_TIF If try to set rest unsupported image types, exception FoxitPDFSDKPython3.e_ErrUnsupported will be thrown.

Returns
  None.

## ◆ SetOptions()

def FoxitPDFSDKPython3.XFAWidget.SetOptions | ( |  | option_array | ) |

Set options of a choice list or an Exclusion Group (for radio button only).

Applicable for choice list and Exclusion Group (for radio button only). For types that are not applicable, this function will return false.

Parameters

  [in] | option_array | An array of choice options to be set.

Returns
  true means success, while false means failure.

## ◆ SetValue()

def FoxitPDFSDKPython3.XFAWidget.SetValue | ( |  | value | ) |

Set the value string.

It is only useful for the XFA widget which type is FoxitPDFSDKPython3.XFAWidget.e_WidgetTypeTextEdit , FoxitPDFSDKPython3.XFAWidget.e_WidgetTypeNumericEdit , FoxitPDFSDKPython3.XFAWidget.e_WidgetTypePasswordEdit or FoxitPDFSDKPython3.XFAWidget.e_WidgetTypeDateTimeEdit .

Parameters

  [in] | value | A string as value to be set. It can be an empty string.

Returns
  None.

## ◆ ValidateValue()

def FoxitPDFSDKPython3.XFAWidget.ValidateValue | ( |  | value,
|  |  | format
| ) |  |

Validate whether the value conforms to the format of current XFA widget.

This function can be called before the function FoxitPDFSDKPython3.XFAWidget.SetValue to check whether the value conforms to the format of current XFA widget.

Parameters

  [in] | value | A string value to be validated.
  [out] | format | A string value that receives the format of current XFA widget. It will be an empty string if current XFA widget has no format.

Returns
  true means the value conforms to the format of current XFA widget, while false means not.