Problem by setting the background color of a Manager

Hello

I have a Manager (chatManager), he has another Manager (chatmsgMngr) in it. chatManager has 2 bars and chatMsgMngr. chat messages are added in chatMsgMngr as chat messages arrived. I want the entire screen to be black. I put the bottom of the chatmsgMngr and chatManager in the dark. Code is this:

public ChatManager() {
  super();
  init();
  this.setBackground(BackgroundFactory.createSolidBackground(Color.BLACK));
}

private void init() {
   .....
   rightBorder = BorderFactory.createBitmapBorder( new XYEdges( 2, 2, 12, 20 ), Bitmap.getBitmapResource( "res/bubble-right.png" ) );
   leftBorder = BorderFactory.createBitmapBorder( new XYEdges( 2, 2, 12, 20 ), Bitmap.getBitmapResource( "res/bubble-left.png" ) );

        chatMsgMngr = new ChatMessageManager(Common.displayWidth, Display.getHeight(), VERTICAL_SCROLL | VERTICAL_SCROLLBAR);
        chatMsgMngr.setBackground(BackgroundFactory.createSolidBackground(Color.BLACK));
        addMessage("Hi from Me !", leftBorder, Field.FIELD_LEFT );

    add(chatMsgMngr);
}

Initially, "Hi me!" message. A part of the screen is black, left is white only. Why is this?

Any guidance?

Thank you

Resolved, please ignore.

Thank you

Tags: BlackBerry Developers

Similar Questions

  • How to set the background color of the title?

    Generally, the title background color is black and the other area of the main screen is white. I want to set the background color of the linear gradient background as blue or something. I try the following 2 ways, but there is always a black line at the bottom of the title bar.

          Background background = BackgroundFactory
                    .createLinearGradientBackground(0x00ff0000, 0x00ff0000,
                            0x0000ff00, 0x0000ff00);
            LabelField title = new LabelField("Hello World Demo",
                    LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
            title.setBackground(background);
            setTitle(title);
    
           LabelField title = new LabelField("Hello World Demo",
                    LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
    
            HorizontalFieldManager hrzManager = new HorizontalFieldManager() {
                protected void paintBackground(Graphics graphics) {
    
                    graphics.setBackgroundColor(0x00382B79);
                    graphics.clear();
                    super.paint(graphics);
                }
            };
            hrzManager.add(title);
            setTitle(hrzManager);
    

    Hello

    I think that there may be a problem using the default setTilte() method.

    Have something by default, behavior with the device.

    It may be a way to customize the default title to remove the black line at the bottom of the title bar.

    But I suggest an alternative that will behave like the title bar without using the setTitle() method.

    You can use something like below to get your condition.

    import net.rim.device.api.ui.*;import net.rim.device.api.ui.component.*;import net.rim.device.api.ui.container.*;import net.rim.device.api.system.*;
    
    class TestScreen extends MainScreen{
    
        private VerticalFieldManager verticalManager;    private HorizontalFieldManager hrzManager;
    
        TestScreen()     {            super(NO_VERTICAL_SCROLL);
    
            LabelField title = new LabelField("Hello World Demo",                        LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
    
            hrzManager = new HorizontalFieldManager()         {            protected void paintBackground(Graphics graphics)             {                graphics.setBackgroundColor(0x00382B79);                graphics.clear();                super.paint(graphics);            }        };        hrzManager.add(title);        this.add(hrzManager);
    
            //rather than  adding component in the mainScreen        //add components in this verticalManager and then        // add this manager to mainScreen          verticalManager = new VerticalFieldManager(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR)        {            /*              public void paint(Graphics graphics)            {                graphics.setBackgroundColor(0x00ffffff);                graphics.clear();                super.paint(graphics);            }            */                        protected void sublayout( int maxWidth, int maxHeight )            {                int width = Display.getWidth();                int height = Display.getHeight() - hrzManager.getHeight();
    
                    super.sublayout( width, height);                setExtent( width, height);            }        };
    
            ButtonField button1 = new ButtonField("Button1");        ButtonField button2 = new ButtonField("Button2");        ButtonField button3 = new ButtonField("Button3");        ButtonField button4 = new ButtonField("Button4");        ButtonField button5 = new ButtonField("Button5");
    
            verticalManager.add(button1);        verticalManager.add(button2);        verticalManager.add(button3);        verticalManager.add(button4);        verticalManager.add(button5);        this.add(verticalManager);
    
        }}
    

    Concerning

    Bika

  • How can I set the background color for a photo book to be between photos as well as on the perimeter?

    I am trying to create a book in iPhoto. I can set the background color, but it doesn't seem to work between photos that appears white by default. How can I make the background color of work between photos?

    You can not

    but to see exactly what you always get an overview of your book before ordering

    LN

  • is it possible to set the background color of a table or chart to be transparent?

    is it possible to set the background color of a table or chart to be transparent?

    Thank you

    Yes.

    Select tools palette (view > tool palette) and set the background of the graph as well as the control in transperent.

  • How to set the background color of an application in bbui.js?

    How can I set the background color of an application that uses the bbui.js?

    his does not work just to put a:

    body {
        background-color: #000000;
    }
    

    It is even easier than... just create the style or the class on your screen

  • How can set the background color of the status bar?

    Quote from the old forum:

    Comments: comments
    How can set the background color of the status bar?
    Posted the: July 17, 2008 02:56
     
    How can set the background color of the status bar?
    Using this code for the status bar:
    LabelField statusField = new LabelField ("Good Morning", LabelField.USE_ALL_WIDTH |) LabelField.NON_FOCUSABLE | LabelField.HCENTER)
    {
    int _backgroundColour = Color.LIGHTGREEN;
    public void paint (Graphics g)
    {
    g.setBackgroundColor (Color.RED);
    g.Clear ();
    Super.Paint (g);
    }
    };

    Font defaultfont = Font.getDefault ();
    Police smallfont = defaultfont.derive (Font.PLAIN, 12);

    statusField.setFont (smallfont);
    setStatus (statusField);

    When I ran the code you have above, my status background color was red.  Is not what you see?  If so, please provide the BlackBerry model and software version that you are testing.  You can find this under Options.

    Or if you try to do something else, please provide details.

    I tested this in the BlackBerry Simulator included with version 4.5.0 BlackBerry JDE (4.5.0.44).

    To do this in version 4.1, first call getColor and save the current color.  Then call setColor, setting the color to the color you want to use for the background.  After this call call fillRect, starting with 0, 0 and go to the size of the field (use this.getWidth () and this.getHeight () to get this).  This must fill in the field with your specified color.

    To allow the drawing of the default content of the field call setColor once again, passing in the original color, then call super.paint.

  • Set the background color of the screen?

    someone knows how to set the background color for a screen?

    Also see this article.

    How - to change the background color of a form

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800256/...

    Concerning

    Bika

  • Setting the background color of a TextArea

    I was not able to set the background color of a text box. Here's what I try and it works for the other components.

    ****************************************************************

    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.stage.Stage;
    import javafx.scene.control.TextArea;
    
    public class TextAreaTest extends Application{
      public void start(Stage stage){
        TextArea area = new TextArea();
        area.setStyle("-fx-background-color: black; -fx-text-fill: lightgreen;");
        Scene s = new Scene(area);
        stage.setTitle("black text area");
        stage.setScene(s);
        stage.show();
      }
      public static void main(String[] args){
        launch(args);
      }
    
    }
    

    ***************************************************************

    I use jdk 8 with whatever version javafx is included. I searched a bit on the internet and I think I see mixed results using this technique.

    Thank you.

    In an external css file, do

    .text-area .content {
       -fx-background-color: black ;
    }
    
  • How to set the background color of a page_item?

    I was pasting "background-color: #5CD65C" in a number of places, like the 'attributes of the HTML table cells' under the label and the tabs of the item, but get no results. Can someone tell me how to set the background color of a cell, please?

    Hi Doug,.
    One method is to add a style to your header html in page attributes, if you add the below css styling and the change of the name of the item page (#P2_FIRST_NAME) to your he should style correctly:

    Thank you

    Paul

  • Setting the background color to a region

    Hi all

    I need to set the background color for the regions on page apex.

    Am trying to do this using the following html tag in the header part of the region, but not able to succeed.

    Can someone help me in this?

    Use APEX 3.2

    Thank you and best regards,
    Santini.

    Published by: Santini on February 23, 2011 04:07

    Change the region-> region attributes, put more css

    // should put backgound-color:red with-in quotes
    style=background-color:red;
    

    Note: You should have #REGION_ATTRIBUTES # reference in the model of your region.

    See http://www.w3schools.com/css/pr_background-color.asp for tips of css.

    Kind regards
    Hari

  • Set the background color of af: SelectOneChoice

    Hi all

    I use Jdeveloper 11 and I have an af:SelectOneChoice in a table.
    According to the value selected on the af: SelectOneChoice I want to set the background color.

    I now have this style as the content property:
    contentStyle = "#{row.priority == 9?' background-color: Red;': ' background-color: White ;'}}"

    When the priority is 9, then the color is red, otherwise it is white.
    It's works well but I want to extend this by assigning the Orange color when the priority is 8 or 7.

    How can I do?

    Well I did it using nested condition and it works.
    Sorry that I have copy paste directly from my code but I'm busy:

    value="#{ (row.bindings.ToKont.inputValue == 'N') ? globalParams.storedText[206]:((row.bindings.ToKont.inputValue == 'Z') ? globalParams.storedText[304] : globalParams.storedText[207]) }"
    

    Good luck :)

  • Setting the background color of the screen

    Hai...

    When my application running in the Simulator, it shows only a small portion with the bgcolor that I gave in the html file. I think that the bgcolor simply encapsulates html content. So, what should I do to view the entire screen with the bgcolor.

    The problem is that in WebWorks (which uses a control called BrowserField) to view the content, the size of the display of web pages grows to the size of the content in your HTML code.

    So if height of your HTML below the screen, it will show the background color of the screen.

    To change this, you can set the window of the display using tags or set the height of the body to the size of the screen.

  • How to set the background colors of different message by account?

    I have two email accounts (let's say a private one for companies) in Thunderbird. Sometimes I (wrongly) mail on the wrong account. That is, I read some messages in a single account, followed by reading in the other account. I hit 'empty' to send a message and be sure to make sure I'm in the right account, that I want to mail to. Every now and then post to the wrong account, get the name wrong 'sender' and I ' answer to "name of the message.

    I looked at the account settings and found I can change the background color (in the e-mails triggered and and sent in the mail while composing). I changed the background color in a SINGLE account (in light yellow) and expects the other account be unchanged (white). Not the case. Change the background color in the account for a single account settings changes the color in all accounts (both).

    It is unexpected and unwanted, and my problem is still there.

    There is an add-on that accounts of color coding and records:

    https://addons.Mozilla.org/en-us/Thunderbird/addon/account-colors/

    and also the modules allowing to choose the correct identity:

    https://addons.Mozilla.org/en-us/Thunderbird/addon/identity-Chooser/

    https://addons.Mozilla.org/en-us/Thunderbird/addon/correct-identity/

    http://chrisramsden.vfast.co.UK/3_How_to_install_Add-ons_in_Thunderbird.html

  • Active window color problem - cannot change the background color

    original title: Active window color problem

    By right-clicking: Desktop, then click on: personalization / window color and appearance / settings (Advanced) appearance, Windows user can assign a background color of the active window in any application.  This is useful for those of us who don't want a stark white screen; We can assign a mild pastel tint which may be easier on the eyes for long term sessions.

    At some recent point, I lost the background color of the active window within Windows uses 'household.  I still not my background color assigned in any application I run (Word, Mail, etc.), but using Windows Explorer to navigate through my hard drive, the active window is now always the default stark white Windows.  How this change and can it be forced to adhere to the assigned active window background color?

    Hello

    Step 1: Check if the problem continues in a new user account.

    http://Windows.Microsoft.com/en-us/Windows-Vista/what-is-a-user-account

    Step 2: If the problem does not persist in a new user account, then the old profile could have been corrupted. Try the following article to fix a corrupted user profile.

    http://Windows.Microsoft.com/en-us/Windows-Vista/fix-a-corrupted-user-profile

  • How to set the background color for the Webworks Menu?

    Hi all

    I have developed a web application that uses the emulator to ripple and Blackberry Webworks SDK 2.3.1.5.In I added the Menu items on the Blackberry Menu button... It works well... It contains the background color by default for Menu (Black)... Here, I want to change the background color of the Menu... Please help me to change the background color... Thank you very much..

    With respect,

    Marimuthu_P

    I don't think that this is possible.  The WebWorks API allows you to add menu items to your application does not provide the ability to change the background color by default of the menu.

    This API is actually an extension of Java built into the SDK WebWorks.  The source code because it's open source, available here: https://github.com/blackberry/WebWorks/tree/master/api/menu/src/main/java/blackberry/ui/menu

    It is based on the Java class "MenuItem", which as you can see it does not provide methods or properties to set the color:

    http://www.BlackBerry.com/developers/docs/7.1.0api/NET/rim/device/API/UI/MenuItem.html

Maybe you are looking for

  • XPCOM. error problem when you try to open Thunderbird

    Hello - I can't open Thunderbird more. When I try to open Thunderbird, I receive the following error message: XPCOM. and no matter what I do, the same message continues to appear whenever I try to open Thunderbird. No access to Thunderbird, everythin

  • My iMac will not close since the last update

    Since the last update for El Capitan, my iMac does not stop and I hold the power button so he can close. Has anyone else had this problem? I'm nervous to download the update on my Macbook pro in case the same thing happens. Also has anyone had a solu

  • Vista and Tecra S1 - need new Display Driver

    Hi all I hope you can help me.I installed Vista Ultimate on my Toshiba Tecra S1 (of control), but I have no correct video driver. Only for Windows XP Home display-ts1-xp-614106476 driver is not accepted by Vista and my Tecra with Videodriver standard

  • How to unlock my phone through computer?

    How to unlock my phone through computer?

  • Override the default shortcut in a language other than English?

    Hello I run a mid-2010 macbook pro with el capitan OS above and when I put my language system of English I am able to turn the keyboard shortcut the system default for the function 'Paste' (cmd + V) based on "Paste and Match Style" as it is described