我試圖在垂直和水平中心垂直和水平的垂直領域管理器中的標籤。我已經成功地將它居中放置,但不是垂直放置。問題是沒有我嘗試過的樣式常量(Field.FIELD_VCENTER,DrawStyle.VCENTER等)。我得到了BlackBerry JRE 6的調試器,並開發了用於Bold 9900設備的調試器。誰能幫忙?在黑莓中水平和垂直居中標籤
VerticalFieldManager vfm_listeAeroport=new VerticalFieldManager (USE_ALL_WIDTH){
protected void sublayout(int maxWidth, int maxHeight) {
super.sublayout(2*Display.getWidth()/3,70);
setExtent(2*Display.getWidth()/3,70);
}
protected void paint(Graphics g){
super.paint(g);
setBackground(BackgroundFactory.createSolidBackground(0xefc94c));
}
};
String mText = "Liste des Aéroports";
LabelField Label = new LabelField(mText,Field.FIELD_HCENTER) {
public void paint(Graphics graphics){
graphics.setColor(0xffffff);
super.paint(graphics);
}
};
vfm_listeAeroport.add(Label);
add(vfm_listeAeroport);
謝謝!