10-28-2010 10:02 AM
Please help to on PhoneScreen
I want put to 2 label field in in single row in screen.
I try with all possible combination of Style argument.
LabelFied.LEFT | LabelField.USE_ALL_WIDTH
Field.FIELD_RIGHT | Field.USE_ALL_WIDTH
DrawStyle.RIGHT | Field.USE_ALL_WIDTH
DrawStyle.RIGHT | DrawStyle.TRAILING |Field.FIELD_RIGHT | Field.USE_ALL_WIDTH
DrawStyle.RIGHT | DrawStyle.TRAILING |LabelField.FIELD_RIGHT | LabelField.USE_ALL_WIDTH
10-28-2010 10:52 AM
HorizontalFieldManagers do not respect horizontal alignment flags - they have their own horizontal placement approach.
One of the possibilities is to use margins (which are respected by most of the BlackBerry built-in Managers):
- calculate LabelField sizes using labelField.getFont().getAdvance(labelField.getText
- calculate and set the right margin on your left field (or the left margin on your right field).
Even though Field.setMargin() is documented only in 6.0 API, it's been working for quite a while (at least since 4.2.1).