Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Contributor
Posts: 9
Registered: ‎05-12-2011
My Device: 9300
My Carrier: Rogers

Menu Issue

I build a HelloWorld application, which has a menu "Escalate". But when I run it in simulator(6.0) or on a real 6.x device, the last 'e' of "Escalate" was cut off. Only "Escalat" is shown. Where is the problem?

 

 

/*
 * SalutationScreen.java
 *
 * © <your company here>, <year>
 * Confidential and proprietary.
 */
import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;

class SalutationScreen extends MainScreen
{
    public SalutationScreen()
    {
        super();
        LabelField applicationTitle = new LabelField("Hello World Title");
        setTitle(applicationTitle);
        RichTextField helloWorldTextField = new RichTextField("Hello World!");
        add(helloWorldTextField);
        
    }
    
    public boolean trackwheelClick(int status, int time) {
        Menu menu = new Menu();
        MenuItem myItem = new MenuItem(new net.rim.device.api.util .StringProvider("Escalate"), 0, 10){
            public void run(){
            }
        };
        menu.add(myItem);
        menu.show();
        return true;
    }

    public boolean onClose()
    {
        Dialog.alert("Bye World!");    
        System.exit(0);
           return true;
    }
}

 



Highlighted
Trusted Contributor
Posts: 159
Registered: ‎02-17-2011
My Device: Not Specified

Re: Menu Issue

i m not sure but  make one change

 

 

MenuItem myItem = new MenuItem(new net.rim.device.api.util .StringProvider("Escalate"), 0, 10)



change as below:

 

MenuItem myItem = new MenuItem(new net.rim.device.api.util .StringProvider("Escalate"), 110, 10)