lcdui item options — common options for lcdui.choicegroup, lcdui.date, lcdui.gauge, lcdui.imageitem, lcdui.spacer, and lcdui.stringitem
The lcdui "item" elements have a number of options in common, which are described here.
Many of these options are layout options, and correspond to what is described here: http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/lcdui/Form.html#layout
lcdui item configuration options
These options may be set as follows, or as options at the time the item is created.
$itemcmd
configure
-optname
optvalue
-label
: the item's labeltext
-anchor
: One of the following
positions. For more information, see http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/lcdui/Graphics.html
position
n
: top/center
ne
: top/right
e
: right/vertically centered
se
: bottom/right
s
: bottom/center
sw
: bottom/left
w
: left/vertically centered
nw
: top/left
center
: horizontally and vertically centered
default
: top/left
bl
: left/baseline
bc
: centered/baseline
br
: right/baseline
-shrink
Indicate that this item's width may be reduced to its minimum
width.
1 | 0
-expand
Indicate that this item's width may be increased to fill available space.
width.
1 | 0
-vexpand
Indicate that this item's height may be increased to fill available space.
width.
1 | 0
-newlinebefore
Indicate that the next item (if any) in the container should be
placed on a new line or row.
1 | 0
-newlineafter
Indicate that this item should be placed at the beginning of a
new line or row.
1 | 0
-layout2
A layout directive indicating that new MIDP 2.0 layout rules are in effect for this item.
1 | 0
-preferredwidth
Preferred width for the item.
width
-preferredheight
Preferred height for the item.
height
-defaultcommand
If this item is
clicked on, the default command to call.
command
refers to a
command object, and not a Hecl proc or command.
command
-commandaction
The Hecl command to call when a command is dispatched.
command
read-only configuration information
All of the above attributes may be read as well as written. There are several more attributes that are "read only". They can be obtained like so:
$itemcmd
cget
-optname
optvalue
-minwidth
: Returns the minimum width for this item.
-minheight
: Returns the minimum height for this item.