ComPDF React Native - v3.0.0
    Preparing search index...

    Class CPDFListboxWidget

    Class representing a listbox form widget, storing basic information about the listbox form.

    CPDFListboxWidget

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Update listbox widget properties with type safety

      Parameters

      • updates: Partial<
            Pick<
                CPDFListboxWidget,
                | "title"
                | "options"
                | "selectItemAtIndex"
                | "fontColor"
                | "fontSize"
                | "familyName"
                | "styleName"
                | "borderColor"
                | "fillColor"
                | "borderWidth",
            >,
        >

        Partial object containing properties to update

      Returns this

      this instance for chaining

      listboxWidget.update({
      title: 'Updated Title',
      options: [
      { value: 'Option 1', displayText: 'Option 1' },
      { value: 'Option 2', displayText: 'Option 2' }],
      selectItemAtIndex: 1,
      fontColor: '#0000FF',
      fontSize: 14,
      familyName: 'Times',
      styleName: 'Bold'
      });
      await document.updateWidget(listboxWidget);
    • Type Parameters

      Parameters

      • this: new (params: Partial<T>) => T
      • json: any

      Returns T

    • Type Parameters

      Parameters

      • this: new (params: Partial<T>) => T
      • jsonArray: any[]

      Returns T[]

    • Returns Omit<CPDFListboxWidget, "createDate" | "update" | "toJSON"> & {
          createDate?: number;
          borderColor: string;
          fillColor: string;
          borderWidth: number;
      }

    Properties

    options: CPDFWidgetItem[]

    The list of options available in the listbox.

    selectItemAtIndex: number

    The index of the selected option in the listbox (default: 0).

    fontColor: string

    The font color of the listbox (default: '#000000').

    fontSize: number

    The font size of the listbox (default: 0).

    familyName: string

    The font family name of the listbox.

    styleName: string

    The font style name of the listbox.

    The type of the form widget.

    title: string

    The title of the form widget (default: empty string).

    page: number

    The page number where the form widget appears (default: 0).

    uuid: string

    The unique identifier for the form widget (default: empty string).

    createDate: Date | null = null

    The date when the form widget was created (default: null).

    rect: CPDFRectF | null = null

    The rectangular coordinates of the form widget (default: null).

    borderColor: string

    The border color of the form widget (default: '#000000').

    fillColor: string

    The fill color of the form widget (default: '#000000').

    borderWidth: number