Phone API Reference - UI Classes (Widgets) - Widget (Base Class) - boxType
Phone API Reference - UI Classes (Widgets) - Widget (Base Class) - boxType
Â
boxType
Description
Sets the type of box that is drawn around the widget.
Basic Example:Â
var grp = new Group(20, 20, (window.w - 40), (window.h - 40));
window.add(grp);
grp.boxType = Widget.BORDER_BOX; |
NO_BOX draws nothing, and whatever is already on the screen remains. Â Other BOX types draw filled images. FRAME types draw non-filled frames; i.e., the interior is transparent so anything already on the screen typically can be seen within the frame.
The following illustrations show the various boxType options applied to a widget defined by "new Group(20, 20, window.w - 40, window.h - 40)" and containing a single text widget at x=20, y=20:
Widget.FLAT_BOX
 Widget.FLAT_BOX is a solid (filled) rectangle with no border. Here it is shown on a black background.
Widget.NO_BOX
Widget.NO_BOXÂ draws no box. Thus, the background color shows through the widget as seen in the first example.
The text in the second example is the same color as the background and, thus. is not visible.
Â
Â
Â
Widget.BORDER_BOX
Widget.BORDER_BOXÂ is similar to FLAT_BOX, except the image is a filled box with a border.
Â
Â
Widget.RFLAT_BOXÂ
Widget.RFLAT_BOXÂ is a filled box with rounded corners and no border. Here it is shown on a black background.
Â
Â
Widget-ROUNDED_BOXÂ
Widget-ROUNDED_BOXÂ is a filled box with a rounded border.
Â
Â
Widget.BORDER_FRAME
Widget.BORDER_FRAMEÂ creates a widget that is a transparent (non-filled) rectangle with a border. This example shows a group with its color set to black the background shows through the interior of the widget.
Â
Â
Widget.OVAL_FRAME
Widget.OVAL_FRAMEÂ creates a widget that is a transparent (non-filled) oval frame with a border.Â
Â
Â
Widget. OVAL_BOX
Widget. OVAL_BOXÂ is a filled oval shape with a border.
Â