FormScrollAreaItemCollection
A collection of all of the items contained in a form scroll area.
Example
form = cf.Form.New() -- Create a scroll area form item formScrollArea = cf.FormScrollArea.New() -- Create a few form items formScrollArea:Add(cf.FormLabel.New("A lot of text.")) formScrollArea:Add(cf.FormLabel.New("even more text")) formScrollArea:Add(cf.FormLabel.New("... more text")) formScrollArea:Add(cf.FormLabel.New("... more text")) formScrollArea:Add(cf.FormLabel.New("... more text")) formScrollArea:Add(cf.FormLabel.New("lost more text")) -- Obtain a handle to the 'FormScrollAreaItemCollection' formScrollAreaItemCollection = formScrollArea.FormItems -- Iterate through all the objects in the scroll area and disable them. for index in ipairs(formScrollAreaItemCollection) do formScrollAreaItemCollection[index].Enabled = false end -- Add the scroll area to the form form:Add(formScrollArea) -- Show and run the form form:Run()
Usage locations
The FormScrollAreaItemCollection object can be accessed from the following locations:
- Collection lists
- FormScrollArea 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 string 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.