FormScrollArea

A scroll area is a type of frame that contains a scrolling view of other items. Scroll areas are often used to make logical groupings of items where many items need to be displayed.

Example

app = pf.GetApplication()
project = app:NewProject()

form = pf.Form.New()

    -- Create a 'FormScrollArea' form item
    
formScrollArea = pf.FormScrollArea.New()

    -- Create a few form items

formScrollArea:Add(pf.FormLabel.New("A lot of text."))
formScrollArea:Add(pf.FormLabel.New("even more text"))
formScrollArea:Add(pf.FormLabel.New("... more text"))
formScrollArea:Add(pf.FormLabel.New("... more text"))
formScrollArea:Add(pf.FormLabel.New("... more text"))
formScrollArea:Add(pf.FormLabel.New("lost more text"))

    -- Add scroll area item to the form

form:Add(formScrollArea)    

    -- Show and run the form

form:Run()

Inheritance

The FormScrollArea object is derived from the FormItem object.

Property List

Enabled
Controls the item enabled state. Setting the enabled state of an item to false will also disable items or their contents. (Read/Write boolean)
FixedHeight
The fixed height of the item in pixels. When the fixed height is set to a positive value, it is the height of the item. Setting the fixed height to zero or a negative value will restore the default/auto setting and the height will be dynamically determined. The fixed height takes precedence over the minimum height and thus the minimum height is ignored when a fixed height is set. (Read/Write number)
FixedWidth
The fixed width of the item in pixels. When the fixed width is set to a positive value, it is the width of the item. Setting the fixed width to zero or a negative value will restore the default/auto setting and the width will be dynamically determined. The fixed width takes precedence over the minimum width and thus the minimum width is ignored when a fixed width is set. (Read/Write number)
ItemHeight
The height of the item in pixels. (Read only number)
ItemWidth
The width of the item in pixels. (Read only number)
MinimumHeight
The minimum height of the item in pixels. When the height is dynamically determined, it will not be less than the minimum height setting. The minimum height value will only be used when the FixedWidth is not set (restored to the default/auto setting). Setting the minimum height to zero or a negative value will restore the default/auto setting where no minimum height is enforced. (Read/Write number)
MinimumWidth
The minimum width of the item in pixels. When the width is dynamically determined, it will not be less than the minimum width setting. The minimum width value will only be used when the FixedWidth is not set (restored to the default/auto setting). Setting the minimum width to zero or a negative value will restore the default/auto setting where no minimum width is enforced. (Read/Write number)
Type
The object type string. (Read only string)
Visible
Controls the item visibility. Setting the visibility of an item to false will also hide items or their contents. (Read/Write boolean)

Collection List

FormItems
The collection of item widgets contained in the scroll area. (FormScrollAreaItemCollection of FormItem.)

Method List

Add (item FormItem)
Adds the given item to the scroll area. Items can be any of the defined form item types.
Add (item FormItem, row number, column number)
Adds the given item to the scroll area at the specified position. Positions are defined as a row and column, starting at (1,1).
Remove (item FormItem)
Removes the given item from the scroll area. The item can be any of the items that resides in the collection of the form items contained in the scroll area.

Constructor Function List

New (layout FormLayoutEnum)
Create a new scroll area item with a specified layout. (Returns a FormScrollArea object.)
New ()
Create a new scroll area item with a vertical layout. (Returns a FormScrollArea object.)

Property Details

Enabled
Controls the item enabled state. Setting the enabled state of an item to false will also disable items or their contents.
Type
boolean
Access
Read/Write
FixedHeight
The fixed height of the item in pixels. When the fixed height is set to a positive value, it is the height of the item. Setting the fixed height to zero or a negative value will restore the default/auto setting and the height will be dynamically determined. The fixed height takes precedence over the minimum height and thus the minimum height is ignored when a fixed height is set.
Type
number
Access
Read/Write
FixedWidth
The fixed width of the item in pixels. When the fixed width is set to a positive value, it is the width of the item. Setting the fixed width to zero or a negative value will restore the default/auto setting and the width will be dynamically determined. The fixed width takes precedence over the minimum width and thus the minimum width is ignored when a fixed width is set.
Type
number
Access
Read/Write
ItemHeight
The height of the item in pixels.
Type
number
Access
Read only
ItemWidth
The width of the item in pixels.
Type
number
Access
Read only
MinimumHeight
The minimum height of the item in pixels. When the height is dynamically determined, it will not be less than the minimum height setting. The minimum height value will only be used when the FixedWidth is not set (restored to the default/auto setting). Setting the minimum height to zero or a negative value will restore the default/auto setting where no minimum height is enforced.
Type
number
Access
Read/Write
MinimumWidth
The minimum width of the item in pixels. When the width is dynamically determined, it will not be less than the minimum width setting. The minimum width value will only be used when the FixedWidth is not set (restored to the default/auto setting). Setting the minimum width to zero or a negative value will restore the default/auto setting where no minimum width is enforced.
Type
number
Access
Read/Write
Type
The object type string.
Type
string
Access
Read only
Visible
Controls the item visibility. Setting the visibility of an item to false will also hide items or their contents.
Type
boolean
Access
Read/Write

Collection Details

FormItems
The collection of item widgets contained in the scroll area.
Type
FormScrollAreaItemCollection

Method Details

Add (item FormItem)
Adds the given item to the scroll area. Items can be any of the defined form item types.
Input Parameters
item(FormItem)
The item widget to add to the scroll area.
Add (item FormItem, row number, column number)
Adds the given item to the scroll area at the specified position. Positions are defined as a row and column, starting at (1,1).
Input Parameters
item(FormItem)
The form item to add to the scroll area.
row(number)
The layout row position.
column(number)
The layout column position.
Remove (item FormItem)
Removes the given item from the scroll area. The item can be any of the items that resides in the collection of the form items contained in the scroll area.
Input Parameters
item(FormItem)
The form item to remove from the scroll area.

Static Function Details

New (layout FormLayoutEnum)
Create a new scroll area item with a specified layout.
Input Parameters
layout(FormLayoutEnum)
A value indicating how new items will be arranged.
Return
FormScrollArea
The newly created scroll area item.
New ()
Create a new scroll area item with a vertical layout.
Return
FormScrollArea
The newly created scroll area item.