Description:
Adds a property item to the Property control.
Syntax:
of_addproperty (string as_group, string as_property, string as_default, string as_type)
of_addproperty (string as_group, string as_property, string as_default, string as_type, string as_dddw_values)
Argument |
Description |
as_group |
The name of the group that the property will be added to. |
as_property |
The name of the property |
as_default |
Default value for the property. To have no default value, pass in an empty string |
as_type |
The type of property that's being added: COLLECTION, COLOR, IMAGE, DDDW, CHECKBOX, VALUE |
as_dddw_values (optional) |
The text for the tooltip that will display when the mouse hovers over the button. |
COLLECTION, COLOR, IMAGE, DDDW, CHECKBOX, VALUE are constants defined in the property control.
Return Value:
Always returns 1
Usage:
COLLECTION - The property will contain a collection of other properties. An elipsis button will display for the property. Clicking this button will open a new properties window where items can be added.
COLOR - Used to select colors. An elipsis button will display which will allow the user to select a color from a color dialog.
IMAGE - An image value can be selected from a list of built in PB images or an image from the file system.
DDDW - The property will contain a list of values in a drop down that the user can select from. If using this property type, pass drop down values as a comma delimited list into as_dddw_values.
CHECKBOX - Displays the property as a checkbox. Values for this property will be 1 (checked) or 0 (unchecked).
VALUE - A free form text box that the user can use to enter any data they like.
Copyright © 2021 Werysoft Inc.