UIEvolutin Inc.
UJML Language Reference
<bg>

The bg element specifies the background color of a visual element.

UJML Tag Syntax
<bg>{color-expr}</bg>

All visual elements rendered by UJML from primitive drawing operations can specify the foreground color of the element. See fg. If the element defines a space it can also specify a background color. See Visual Elements. The colors are specified as an int value. See UJML Colors.

Contains
Element 
Purpose 
Default Value 
eval 
Evaluates a scripting expression and returns the result. 
None 
ref 
Returns the value of a variable. 
None 
int value 
An integer constant (numeric value or entity) that evaluates to a valid UJML color. See UJML Colors
Depends on the containing element 
Is contained by
Element 
box 

The following example shows how to display a box using variables for the box properties. It is part of the visualelements.ujml sample.

<box>
    <x><eval>mRectX</eval></x>
    <y><eval>mRectY</eval></y>
    <width><eval>mRectWidth</eval></width>
    <height><eval>mRectHeight</eval></height>
    <fg><eval>mForeColor</eval></fg>
    <bg><eval>makeColor(mBackColor, mOpacity)</eval></bg>
</box>

 

 

Figure 1. A box displayed by the visualelements.ujml sample.

Copyright (c) 2000-2007 UIEvolution, Inc. All rights reserved.
What do you think about this topic? Send feedback!