Reputation: 11
How do I align elements right-to-left in a BlackBerry HorizontalFieldManager?
Upvotes: 1
Views: 1416
Reputation: 3226
HorizontalFieldManager adds fields from left-to-right by default. In the following example, the three labels are aligned in one row from left to right.
HorizonatalFieldManager hManager=new HorizonatalFieldManager();
LabelField l1=new LabelField("Label1");
LabelField l2=new LabelField("Label2");
LabelField l3=new LabelField("Label3");
hManager.add(l1);
hManager.add(l2);
hManager.add(l3);
Upvotes: -1
Reputation: 11876
On JDE 6.0, if you want to do this for locale reasons, then setting the HorizontalFieldManager.LOCALE_AWARE_LAYOUT style bit will cause left-to-right or right-to-left, depending on the user's locale.
The HorizontalFieldManager docs for BlackBerry JDE 6.0 mention a style bit Field.LEFT_TO_RIGHT and Field.RIGHT_TO_LEFT, but I don't see those constants in Eclipse, so that may be a documentation bug.
Upvotes: 2