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
Developer
satish4ru
Posts: 329
Registered: ‎12-17-2010
My Device: Not Specified

DialogBox With Radiobuttons and Button

hiiii frds 

 

in my application i want add a group of RadioButtons to the dialogBox.........  i can add TextField and Editfield and many field but i unable to add Radiobuttons please give sample ..

 

thank you

 

Regards

Satish kumar

 

Developer
pwerry
Posts: 177
Registered: ‎01-21-2009
My Device: 9900

Re: DialogBox With Radiobuttons and Button

Hi Satish,

 

What you're trying to achieve should be possible. Can you post a code sample for us?

Developer
satish4ru
Posts: 329
Registered: ‎12-17-2010
My Device: Not Specified

Re: DialogBox With Radiobuttons and Button

 

package com.logictreeit.party;

import java.util.Vector;

import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.MenuItem;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.ListField;
import net.rim.device.api.ui.container.MainScreen;


public class EventsDisplayScreen extends MainScreen {
	private ListField eventListField;
	private Vector eventList;
	
//	RadioButtonGroup radioButtonGroup;
	public EventsDisplayScreen(final Vector eventList){
		eventListField = new ListField();
		this.eventList = eventList;
		
	
		
		
		MenuItem filterMenu = new MenuItem("Filter", 0, 0) {
			
			public void run(){ 
					
			// here i want get Dialog with RadioButtonFields is it possible.......							
				
			}
		};
		
		ComplexListCallBack complexListCallback = new ComplexListCallBack(eventListField, eventList);
		eventListField.setSize(eventList.size());
		eventListField.setCallback(complexListCallback);
		add(eventListField);
		addMenuItem(filterMenu);
		
	}
	protected boolean navigationClick(int status, int time) {
	
		 Field field = this.getFieldWithFocus();
		 if(field.equals(eventListField)){
			 int index = eventListField.getSelectedIndex();
			
				UiApplication.getUiApplication().pushScreen(new DetailPage((Event) eventList.elementAt(index)));
			
		 }
		return super.navigationClick(status, time);
	}
}

 

 

Developer
satish4ru
Posts: 329
Registered: ‎12-17-2010
My Device: Not Specified

Re: DialogBox With Radiobuttons and Button

i sand  my code  to you please give reply to me ...

 

please give me the answer fast...