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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Regular Contributor
Posts: 77
Registered: ‎06-13-2013
My Device: 9900
My Carrier: blackberry cure

Why drop downis not display in blackberry?

 


 

I am adding drop down in my screen, But It is not display .Actually my background is black .I think due to black background it in not display but when focus is come it show all option I use code from Here can I change my drop down colour ?

http://docs.blackberry.com/en/developers/deliverables/11958/Create_a_drop-down_list_509565_11.jsp

Developer
Posts: 17,026
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Why drop downis not display in blackberry?

please post your code.
a dropdown should be visible on a black background.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Regular Contributor
Posts: 77
Registered: ‎06-13-2013
My Device: 9900
My Carrier: blackberry cure

why the label of ObjectChoiceField hide when background is black in blackberry

I am using ObjectChoiceField actually My label is hide when I use black background ?I am using this example

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

My text is "Day of week " is hide due to black background ? How to give some margin to given label *"Day of week "

 

 

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);
        
    }
}

 

 

Highlighted
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: why the label of ObjectChoiceField hide when background is black in blackberry

Try the following, and review the API so you know when to set the Background color and when to set the Foreground color.

 

        String choices[] = {"Monday","Tuesday","Wednesday","Thursday","Friday", "Saturday", "Sunday"};
        int iSetTo = 0;
        VerticalFieldManager vfm=new VerticalFieldManager(){
        	protected void paint(Graphics graphics) {
        		graphics.setBackgroundColor(Color.BLACK);
        		graphics.clear();
        		super.paint(graphics);
        	}
        };
        vfm.add(new ObjectChoiceField("Day of the week",choices,iSetTo){
        	protected void paint(Graphics graphics) {
        		graphics.setColor(Color.WHITE);
        		super.paint(graphics);
        	}
        });

 

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: why the label of ObjectChoiceField hide when background is black in blackberry

Since you use the above code in your other Thread:

 

http://supportforums.blackberry.com/t5/Java-Development/How-to-move-drop-left-in-blackberry-java/m-p...

 

I assume that it has provided the solution to your problem.  If so, it is usual and good practice to mark the Thread as solved.  Instructions for doing this can be found using the Help link near the top of the screen.