在VerticalFieldManager黑莓视野对齐 [英] Blackberry Field alignment in a VerticalFieldManager

查看:93
本文介绍了在VerticalFieldManager黑莓视野对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在一个垂直领域经理添加两个字段。我想第一个要在右边的左边和第二个(第二行)对齐。

I want to add two fields in a vertical field manager. I want the first one to be align on the left and the second one (on the second line) on the right.

推荐答案

您可以使用字段构造函数的风格参数来指定对齐,水平和垂直。

You can use the style argument of the field constructor to specify alignment, both horizontal and vertical.

    VerticalFieldManager titlevfm = new VerticalFieldManager();
    LabelField leftField = new LabelField("my label", Field.FIELD_LEFT);
    LabelField rightField = new LabelField("right field", Field.FIELD_RIGHT);
    titlevfm.add(leftField);
    titlevfm.add(rightField);

这篇关于在VerticalFieldManager黑莓视野对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆