FormLayoutItemCollection
A collection of all of the items contained in a form layout.
Example
app = pf.GetApplication() project = app:NewProject() form = pf.Form.New() -- Create a few form items label = pf.FormLabel.New("Specify a frequency:") lineEdit = pf.FormLineEdit.New("Frequency") -- Create a layout item formLayout = pf.FormLayout.New(pf.Enums.FormLayoutEnum.Vertical) -- Add items to the layout formLayout:Add(label) formLayout:Add(lineEdit) -- Add layout item to the form form:Add(formLayout) -- Obtain a handle to the 'FormLayoutItemCollection' formLayoutItemCollection = form.FormItems[1].FormItems -- Iterate through the layout collection and disable the items. for index in ipairs(formLayoutItemCollection) do formLayoutItemCollection[index].Enabled = false end form:Run()
Usage locations
The FormLayoutItemCollection object can be accessed from the following locations:
- Collection lists
- FormLayout object has collection FormItems.
Property List
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
Property Details
Method Details
- Contains (label string)
- Checks if the collection contains an item with the given label.
- Item (index number)
- Returns the FormItem at the given index.
- Item (label string)
- Returns the FormItem with the given label.
- Items ()
- Returns 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.