Class property

Official Content
This documentation is valid for:
Assigns a Theme Class to a control.


control. Class = ThemeClass object or Value

ThemeClass object 
    Represents the class defined in the theme associated with that control.   

    Represents a value that can be assigned to this property at runtime. It can be either a constant value or a variable.


In the following example, a Theme Class is assigned to the class property of a “Grid1” grid control.

”GreenGrid” and ”BlueGrid” are two classes derived from the “Grid” predefined class. These classes are defined in the Theme associated with the object that contains the control.

//A ThemeClass is asssigned
If &import > 0
   Grid1.class = ThemeClass:GreenGrid
   Grid1.class = ThemeClass:BlueGrid

//A Value is assigned
If &import > 0
   Grid1.class = !”GreenGrid”
   Grid1.class = !”BlueGrid”

To associate two or more classes to a control's class property, just use the '+' operator to concatenate the strings, as the following code shows:

If &import > 0
   Grid1.class = ThemeClass:GreenGrid + !" " + ThemeClass:GreenLightGrid
   Grid1.class = ThemeClass:BlueGrid + !" " + ThemeClass:BlueLightGrid

Important: It is highly recommended that you use the ThemeClass:ClassName syntax, because it creates a reference to the Theme class. When a string value is used, there is no way to know which classes are referenced by an object.


Objects: Panel for Smart Devices, Transaction, Web Panel
Platforms: Web(.Net, Java), Smart Devices(Android, IOS)
Controls: Attribute, Button, FreeStyle Grid, Grid, Text Block

See Also

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