为什么当黑莓背景为黑色时,对象选择字段的标签会隐藏

时间:2013-12-10 15:36:44

标签: blackberry

我正在使用ObjectChoiceField我使用黑色背景时隐藏了我的标签?我正在使用这个例子

http://docs.blackberry.com/en/developers/deliverables/18125/Drop_down_menus_1177778_11.jsp

我的文字“星期几”因黑色背景而隐藏? 如何给予标签* “星期几”

一些保证金
package mypackage;

import net.rim.device.api.system.Display;
import net.rim.device.api.ui.Color;
import net.rim.device.api.ui.Graphics;
import net.rim.device.api.ui.component.ButtonField;
import net.rim.device.api.ui.component.ObjectChoiceField;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.ui.container.VerticalFieldManager;

/**
 * A class extending the MainScreen class, which provides default standard
 * behavior for BlackBerry GUI applications.
 */
public final class MyScreen extends MainScreen
{
    /**
     * Creates a new MyScreen object
     */
    public MyScreen()
    {        
        // Set the displayed title of the screen       
        setTitle("Drop-down List Demo"); 
        String choices[] = {"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"};
        int iSetTo = 0;
        VerticalFieldManager vfm=new VerticalFieldManager(){
            protected void paint(Graphics graphics) {
                // TODO Auto-generated method stub
                graphics.setBackgroundColor(Color.BLACK);
                graphics.fillRect(0, 0, Display.getWidth(), 800);
                super.paint(graphics);
            }
        };
        vfm.add(new ObjectChoiceField("Day of the week",choices,iSetTo){
            protected void paint(Graphics graphics) {
                // TODO Auto-generated method stub
                graphics.setBackgroundColor(Color.WHITE);

                super.paint(graphics);
            }
        });



        add(vfm);

    }
}

0 个答案:

没有答案