BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 04-27-2009, 02:12 PM   #1 (permalink)
New Member
 
Join Date: Oct 2008
Location: Ontario, Canada
Model: 8330
OS: 4.5.0.77
PIN: 3026CA27
Carrier: Bell Mobility
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How to show a new form

Please Login to Remove!

I have my "main" form which has a menu. When the user clicks Options on the menu, I'd like to display a new form -- for, you guessed it, the user to change options . The code for the menu is:

Code:
        menu.add(new MenuItem("Options" , 100, 10)
        {
            public void run()
            {
                Dialog.alert("OPTIONS");
            }
        });
I'm guessing I need to replace the Dialog.alert("OPTIONS"); with something, but I'm not sure what.
Offline  
Old 04-28-2009, 11:01 AM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

Quote:
Originally Posted by guylaroche View Post
I have my "main" form which has a menu. When the user clicks Options on the menu, I'd like to display a new form -- for, you guessed it, the user to change options . The code for the menu is:

Code:
        menu.add(new MenuItem("Options" , 100, 10)
        {
            public void run()
            {
                Dialog.alert("OPTIONS");
            }
        });
I'm guessing I need to replace the Dialog.alert("OPTIONS"); with something, but I'm not sure what.
I assume by form you mean Screen.

Code:
class MyMainScreen extends MainScreen
{
        public MyMainScreen()
        {
              ...
        }
}
Code:
        menu.add( new MenuItem("New Screen",100, 10)
        {
            public void run()
            {
                UiApplication.getUiApplication().pushScreen(new MyMainScreen());
            }
        });
__________________
My other Blackberry is a PlayBook.
Offline  




Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.