FormItemCollection

A collection of all of the items contained in a form.

Example

form = pf.Form.New()

    -- Create a variety of form items
    
checkbox = pf.FormCheckBox.New("Export electric near fields.")
label = pf.FormLabel.New("Item 1")
dirBrowser = pf.FormDirectoryBrowser.New("Output directory:")

form:Add(checkbox)
form:Add(label)
form:Add(dirBrowser)

    -- All form items share the Enabled and Visible properties       

for i = 1,#form.FormItems do
    form.FormItems[i].Enabled = false
end

form:Run()

Usage locations

The FormItemCollection object can be accessed from the following locations:

Property List

Count
The number of FormItem items in the collection. (Read only number)
Type
The object type string. (Read only string)

Method List

Contains (label string)
Checks if the collection contains an item with the given label. (Returns a boolean object.)
Item (index number)
Returns the FormItem at the given index. (Returns a FormItem object.)
Item (label string)
Returns the FormItem with the given label. (Returns a FormItem object.)
Items ()
Returns a table of FormItem. (Returns a List of FormItem object.)
UniqueName (label string)
Generates a unique name base of of the provided base name.If the base name already exists in the collection, a digit will be appended until a valid name is generated. (Returns a boolean object.)

Index List

[number]
Returns the FormItem at the given index in the collection. (Read FormItem)
[string]
Returns the FormItem with the given name in the collection. (Read FormItem)

Property Details

Count
The number of FormItem items in the collection.
Type
number
Access
Read only
Type
The object type string.
Type
string
Access
Read only

Method Details

Contains (label string)
Checks if the collection contains an item with the given label.
Input Parameters
label(string)
The label of the FormItem.
Return
boolean
The success of the check.
Item (index number)
Returns the FormItem at the given index.
Input Parameters
index(number)
The index of the FormItem.
Return
FormItem
The FormItem at the given index.
Item (label string)
Returns the FormItem with the given label.
Input Parameters
label(string)
The label of the FormItem.
Return
FormItem
The FormItem with the given label.
Items ()
Returns a table of FormItem.
Return
List of FormItem
A table of FormItem.
UniqueName (label string)
Generates a unique name base of of the provided base name.If the base name already exists in the collection, a digit will be appended until a valid name is generated.
Input Parameters
label(string)
The base name.
Return
boolean
The generated unique name label for FormItem.