@VEProperty

When you write a Rich UI widget (or an external-type widget, as described in another topic), you can ensure that widget-specific properties are in the Properties view whenever you use the EGL editor to create a widget of the new type. You make the properties available by setting @VEProperty for each widget field that you want to list in the Properties view. @VEProperty is useful only when the @VEWidget and @EGLProperty properties are set.
Here are example uses of @VEProperty::
mySimpleProperty String {
   @EGLProperty{}, 
   @VEProperty{category = "Basic"}};

myChoiceProperty String{
   @EGLProperty{},
   @VEProperty{category = "Advanced",
               propertyType = "choice",
               choices = [
                  @VEPropertyChoice {displayName = "3D", id = "3"},
                  @VEPropertyChoice {displayName = "4D", id = "4"} 
               ]}};

Not shown are the functions that get and set the EGL properties.

The property fields in @VEProperty are as follows:
category
The category in which the property is listed in the Properties view. If the category does not exist, a new category is created with the name you specify. The category field takes a string.

The categories in the Properties view are in reverse order of their initial reference in the Rich UI widget or external type. The last-specified category is listed first, and the categories that are available for all widgets are displayed last. Similarly, the properties in a given category are in reverse order of declaration in the Rich UI widget or external type.

propertyType
The type of value required in the property. By default, the type is the type of the field in the widget definition. The only valid value for propertyType is choice, which is used if you intend to specify an array of choices, as shown in the previous example.
choices
An array of @VEPropertyChoice elements, each of which includes at least the first of the following two fields:
displayName
A string that represents the choice in the Properties view. This value is required.
id
A string that holds the content assigned to the property in the Rich UI application. This value is required. The type of the assigned value must be the same as the type of the property that is receiving the value.

Changes to @VEProperty are available to a file in the EGL editor only if you refresh the palette and the file. To refresh the palette, click the Refresh palette tool on the Design surface, as noted in “Using the tools on the Design surface.” To refresh the file, click the Refresh web page tool on the Preview tab, as noted in “Running a web application in the EGL Rich UI editor.”


Feedback