Class property (in run-time for Smart Devices)

Official Content
This documentation is valid for:

Allows modifying the class of a control, both at design time and runtime. It is the same purpose as that of Class property used for web applications, but for Smart Devices.

Syntax

Control.class = Value

Where

Value
    Represents the name of a class defined theme associated with the object that contains the control.

Example

We could want to change the class of a control depending on the action taken.

For example, if we have the following class defined on our theme:

ClassPropertyThemeProperties

The class property can be changed using an action defined on the form and the value of a variable also defined on the form. 

For example:

If we want to change the class of our group, we should do as follows:

Group1.Class = 'Group.Group_Border_Red'

Or we could also use the value of a variable as follows:

Group.Class = &MyVar

We could want to change a control's class, which is defined in a grid, to the value of an attribute or variable defined inside or outside that grid. This could be done in the following cases:

  • Using directly the class value (as in the first example), over a control defined anywhere in the form, and triggered by an action defined in the grid.
  • Over a control defined in the form and using the value of a variable defined in a grid and triggered by an action defined in the same grid.
  • Over a control defined in a grid and using the value of a variable defined in the same grid and triggered by an action also defined also in the same grid.
  • Using actions defined in the Application Bar over a control whether in a grid or in the form, using directly the class value (as in the first example) or the value of a variable defined in the form.

Temporary restrictions

  • Using an action in a grid and the value of a variable in the form is not supported, and neither is using an action defined in the form or Application Bar and the value of a variable defined in the grid.
  • Using an action defined in the form or Application Bar to change the class property of any control defined in a grid, using the value of a variable defined in a grid.
  • Using an action defined in a grid to change the class property of any control defined in a grid, and the value of a variable defined in the form.

Note

  • This property can be used in both, start or load events as well as in user defined events.

Scope

Objects Smart Devices Generator
Controls Smart Device Events, Attribute definition, Insert Attribute/Variable Dialog, Image data type, Text Block,  Grid, Group, Tab, Table.
Platform Android Smart Devices, Apple Smart Devices (iOS), BlackBerry Smart Devices
   

See also

Class property




Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.