×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    May 2013
    Posts
    280

    How to show choice list in dialog box

    I have a s40 theme form which displays list . On clicking each list item i am getting one dialog box.
    I want to show choice list in that dialog (which will allow user to select one item at a time).

    How to do that ?

  2. #2
    Regular Contributor
    Join Date
    Dec 2012
    Location
    India
    Posts
    271

    Re: How to show choice list in dialog box

    Create a custom dialog and add the list there.
    Code:
    Dialog d = new Dialog();
    d.addComponent(...);
    d.show();
    I would also like to suggest you to look at a component called PopupChoiceGroup.It is available in LWUIT for S40 and may help your case.

  3. #3
    Registered User
    Join Date
    May 2013
    Posts
    280

    Re: How to show choice list in dialog box

    Thanks arunkam. yes i was trying PopupChoiceGroup and it is displaying very well. Can you guide me how to put listeners on each selected optionof PopupChoiceGroup.
    I am able to display PopupChoiceGroup well. I searched for action listeners for it but could not find one

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: How to show choice list in dialog box

    some how i had issues with PopChoiceGroup Component in LWUIT, so i use a ButtonGroup and RadioButton Combination in one of my application:

    Code:
    		Dialog dlg = new Dialog("Select Price");
    		priceDlg.setScrollable(false);
    		BoxLayout dlgLayout = new BoxLayout(BoxLayout.Y_AXIS);
    		priceDlg.setLayout(dlgLayout);
    				
    		ButtonGroup btnGroup = new ButtonGroup();
    		
    		for(int i = 0; i<3;i++) {
    			RadioButton radioBtn = new RadioButton("Radio Button "+i);
    			btnGroup.add(radioBtn);
    			priceDlg.addComponent(radioBtn);
    			
    			radioBtn.addActionListener(new ActionListener() {
    				
    				public void actionPerformed(ActionEvent arg0) {
    				//listen actions here !!
    				}
    			});
    		}
    There can be some other good ways of doing this !!

Similar Threads

  1. How to show connection dialog without show View in GUI app (main app)
    By hariyanto_toto in forum Symbian User Interface
    Replies: 1
    Last Post: 2010-12-06, 06:58
  2. Choice list in dialog
    By datho in forum Symbian User Interface
    Replies: 5
    Last Post: 2007-04-11, 12:30
  3. Problem in Choice list.......
    By platinnum in forum Symbian
    Replies: 0
    Last Post: 2005-04-21, 16:21
  4. Popup list/Choice from list
    By brianpegan in forum Mobile Java General
    Replies: 0
    Last Post: 2004-03-18, 11:43
  5. Dialog with Choice List
    By mrusi in forum Symbian User Interface
    Replies: 0
    Last Post: 2002-08-29, 12:17

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×