Copyright 2010-2017 Obihai Technology, Inc.
146
To finely control the various aspects of each component (such as position, size, font, color, etc.), you can specify a
style
attribute to select a style to use for the item. The value of
style
must be the
id
of a <style> that is configured in the
Screen Item Customization
::
MainMenuItemStyles
parameter. If
style
attribute is not specified, the <style>
with id = "default", if present, is used to style the item.
Elements in <MainMenu>
Element
Attributes
Description
<MainMenu>
Required:
Optional: ncol, width,
noscroll, scrollstyle, c1, c2, c3,
c4, cell-width, cell-height,
hlborder, hlbordercolor,
textcolor, hltextcolor, font,
size
Root element.
<item>
Required:
Optional: id, label, number,
name, service, refresh-id
One of more allowed. Each <item> describes one tile on the Main
Menu. They are displayed on the screen in the order as listed (left to
right, and top to bottom).
Attributes in <MainMenu>
Attribute
Description
ncol
Number of columns in the menu. It is allowed to specify a variable here to track for example,
whether the Line Keys are hidden, as:
"$eval($sys.lines?4:6)"
The last example uses 4 columns when the Line Keys are visible and 6 columns when they are not.
Default = "3"
width
Pixel width of the table. It is allowed to specify a variable here to track for example, whether the Line
Keys are hidden, as:
"$eval($sys.lines?320:480)"
The last example is 320 pixel wide when the Line Keys are visible and 480 pxiel wide when they are
not.
Default = "320"
height
Pixel height of the table.
Default = "204"
xpos
X position of the upper left corner
Default = "0"
ypos
Y position of the upper right corner
Default = "0"
noscroll
Whether to show a scroll bar if there are more than 1 page of menu items. Value can be 0 (show
scrollbar) or 1 (hide scrollbar)
Default = "1"
scrollstyle
Scrollbar Style, of scrollbar is enabled. Valid values are:
•
0
–
slider on the right of the table
•
1
–
up/down arrow icon on the top and/or bottom of the screen
•
2
–
A number of dots on the right of the table corresponding to number of pages of menu items;
the highlighted dot indiates the current page
Default = "1"
c1
–
c4
Four constants to substitute respectively @c1 - @c4 in item and style attributes. For example the
value can be set to the common root path of the image files to be used as icons for all menu items,