How Do I Make a Control Semi-Transparent? (Magic xpa 3.x)
| |
Usually, the background color of a control is solid, transparent or inherited from Windows.
When developing for mobile devices, you sometimes want to have semi-transparent controls.
The first Text control, “My Vacation” is a 2D Text control with a solid white background. The second two both have opaque (solid) backgrounds, and different color foreground texts.
How do we do this? Basically all we do is set a value for the opacity level in Magic xpa's Color repository. Below we will show you how to do that.
|
-
Go to Options->Settings->Colors.
-
Click on the color you want to change, or press F4 at the end of the color table to create a new color.
-
Zoom on the background color.
-
Set the system color to blank. You do this by selecting the empty line at the top of the drop-down list.
-
In the Alpha field, you can set various levels of opacity. The valid values are 0 to 255 where 0 means full transparency (equivalent to selecting the Transparent check box) and 255 (default) means completely opaque.
-
Click OK.
-
When you get back to the color list, you can set the foreground color the same way.
-
Click OK to exit the Application Colors dialog box.
Platform specific: This functionality is supported for mobile devices only.
Since version: 2.5
How Do I Make a Control Transparent?