FormDataSelector

Select result data of the specified type.

Example

app = pf.GetApplication()
app:NewProject()
app:OpenFile(FEKO_HOME..[[/shared/Resources/Automation/startup.fek]])

    -- Create a from and add a 'FormDataSelector' for 'FarField'
    
form = pf.Form.New("Export far field")
selector = pf.FormDataSelector.New("Choose far field:", 
                         pf.Enums.FormDataSelectorType.FarField)
form:Add(selector)

    -- Run the form and retrieve the selection
    
form:Run()
resultData = selector.Value

Inheritance

The FormDataSelector object is derived from the FormItem object.

Usage locations

The FormDataSelector object can be accessed from the following locations:

Property List

Count
The number of data selector items. (Read only number)
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)
IncludeMissingData
Setting this property to true will populate the data selector with valid and invalid result data. Setting this property to false will populate the data selector with valid result data only. Changing this property alone will have no effect, the refresh method must be called to re-populate the data selector. (Read/Write boolean)
Index
The index of the selected item from the data selector. (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)
SelectorType
The data selector type. (Read only FormDataSelectorType)
Type
The object type string. (Read only string)
Value
The selected data. (Read only ResultData)
Visible
Controls the item visibility. Setting the visibility of an item to false will also hide items or their contents. (Read/Write boolean)

Method List

ClearCallBack ()
Clear the function that will be called when the check box state changes.
Refresh ()
This method re-populates the data selector with the currently available result data.
SetCallBack (callback function)
Set the function that will be called when the data selector state changes.

Constructor Function List

New (label string, type FormDataSelectorType)
Create a specified data selector type. The selector will contain a list of result data available in the model. (Returns a FormDataSelector object.)
New (type FormDataSelectorType)
Create a specified data selector type. The selector will contain a list of result data available in the model. (Returns a FormDataSelector object.)

Property Details

Count
The number of data selector items.
Type
number
Access
Read only
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
IncludeMissingData
Setting this property to true will populate the data selector with valid and invalid result data. Setting this property to false will populate the data selector with valid result data only. Changing this property alone will have no effect, the refresh method must be called to re-populate the data selector.
Type
boolean
Access
Read/Write
Index
The index of the selected item from the data selector.
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
SelectorType
The data selector type.
Type
FormDataSelectorType
Access
Read only
Type
The object type string.
Type
string
Access
Read only
Value
The selected data.
Type
ResultData
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

Method Details

ClearCallBack ()
Clear the function that will be called when the check box state changes.
Refresh ()
This method re-populates the data selector with the currently available result data.
SetCallBack (callback function)
Set the function that will be called when the data selector state changes.
Input Parameters
callback(function)
The function call back.

Static Function Details

New (label string, type FormDataSelectorType)
Create a specified data selector type. The selector will contain a list of result data available in the model.
Input Parameters
label(string)
The item label.
type(FormDataSelectorType)
The data selector type.
Return
FormDataSelector
The label item created.
New (type FormDataSelectorType)
Create a specified data selector type. The selector will contain a list of result data available in the model.
Input Parameters
type(FormDataSelectorType)
The data selector type.
Return
FormDataSelector
The label item created.