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).

Advertisement

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.

Tags: BlackBerry Developers

Similar Questions

  • BlackBerry Smartphones Blackberry Bold 9700 os6 - how to remove the status bar (3g, indicator of service) at the top

    BlackBerry Bold 9700 os6 - how to remove the status bar (3g, indicator of service) at the top?

    I love the new OS6 and MEDIA SYNC is great.  Finally my itunes music is available on my blackberry!

    You can "get rid of it.
    The only change you can make is the 5 bars can be changed by the numbers by pressing ALT + NMLL (instead of the signal bars, you see the actual level in dBm)

  • How to remove the status bar at the bottom of the browser full screen

    We have an application that is running in mode full screen for public display, so having the popup status bar at the bottom of the screen is annoying when it moves between pages is distracting and takes away from the experience of the user.
    How to turn off the status bar so that it is no longer appear when the browser is in full screen mode?

    Or you hear the floating message that describes the current activity of the browser (for example, waiting...) or displays the URL of the link currently hovered?

    Which can be deleted using custom style rules. Here is an example of a thread on how you could do this:

    How can I disable the popup to address link at the bottom of the page?

    It is from Firefox 25. It still works in Firefox 30?

  • How to customize the status bar, to see the send/receive status bar

    I have TB 24.4.0 on computers both Win 7 and Win Vista.
    On the installation of Win 7, I can (usually *) see email send/receive progress in the lower-left corner of the status bar (for example "Inbox to check for new messages", then POP3 for my various accounts etc.). I also see a green progress downstairs bar right when messages are sent or received. On this one, I also see the number of messages in each folder, extreme right (no read: # and Total: #).
    On the installation of Vista, numbers no read and Total are below on the left, but when I send and receive my email, there is no similar progress message (and no indication that the send/receive is actually at work, unless I get a new email).
    I would like to be able see the two send/receive status and the progress bar send/receive in the status bar. How can I do this? No read/Total numbers lower-left (instead of at the bottom right) block this?
    (* As in the past, even on my Win 7 installation, sometimes send/receive status disappears from the status bar - and I think that in this case no read/Total numbers to the left switch - but it didn't happen for a while. Why is it?)
    I can add screenshots if this will help.
    Forward advice or solutions. Thank you.

    See if you have the add on Adblocker Plus installed on the problem system. If so turn it off and restart Thunderbird. This add on is known to cause this problem.

  • How to remove the status bar?

    I would like to remove the status bar (not to get that back a 'old' or something else, just get rid of it). I can't find any useful information with a google search and it doesn't SEEM to be an add-on for that.

    You can use this extension to remove that popup:

  • How to recover the status bar

    original title: I lost my status bar, how do I get that back

    He lost when I added security

    Hi, Thomas,.

    Right-click next to the new tab, and then select the status bar

  • How can I change background color on the taskbar

    How to change the background on the task and tool bar is difficult to reac blue cloud

    Hello

    Welcome to the Forums Community Microsoft and thanks for posting the question.

    According to the description, you need assistance to change the color on the taskbar.

    You can change the color of the taskbar of as follows:

    a. right click on the empty space on the desktop.

    b. click on Customize.

    c. click on Windows color to the bottom of the window.

    d. click on drop down menu to show color mixer.

    e. you can now move the sliders accordingly and change the required color.

    Change the colors on your computer

    http://Windows.Microsoft.com/en-us/Windows7/change-the-colors-on-your-computer

    Hope this information helps. Get back to us if you have more queries about Windows.

  • How can set the background of the screen

    I was going through all the thread related to this issue in this form, but could not be a good solution. I want to set the background color of the screen (main screen) and add fields on it. I found the solution for background coloring, but not fields not displayed after staining.

    With the help of the Simulator: 7290

    Code of CELITE (and jfisher) to blackberryforums.com
    http://www.BlackBerryForums.com/developer-forum/89940-mainScreen-background-color.html

    class ExtendedCustomMainScreen extends CustomMainScreen {}
    {ExtendedCustomMainScreen()}
    Super();
    Rtf RichTextField = new RichTextField ("This is a readonly textfield", Field.READONLY);
    LabelField helloWorld = new LabelField ("Hi jfisher! ');
    Add (rtf);
    Add (helloWorld);
    }
    }

    class CustomMainScreen extends form {}

    Private VerticalFieldManager _container;

    {CustomMainScreen()}
    Super (Manager.NO_VERTICAL_SCROLL |) Manager.NO_VERTICAL_SCROLLBAR);
    setTitle ('Test');

    VerticalFieldManager internalManager = new VerticalFieldManager (Manager.NO_VERTICAL_SCROLL |) Manager.NO_VERTICAL_SCROLLBAR) {}
    {} public void paintBackground (Graphics g)
    g.Clear ();
    Color int = g.getColor ();
    g.setColor (0xc0dce0);
    g.fillRect (0, 0, Display.getWidth (), Display.getHeight ());
    g.setColor (color);
    }
    protected void sublayout (int maxWidth, maxHeight int) {}
    Field titleField = getMyTitleField();
    int titleFieldHeight = 0;
    If (titleField! = null) {}
    titleFieldHeight = titleField.getHeight ();
    }

    int displayWidth = Display.getWidth (); I would probably make these global
    int displayHeight = Display.getHeight ();

    Super.sublayout (displayWidth, displayHeight - titleFieldHeight);
    setExtent (displayWidth, displayHeight - titleFieldHeight);
    }

    };
    _container = new VerticalFieldManager (Manager.VERTICAL_SCROLL |) Manager.VERTICAL_SCROLLBAR);
    internalManager.add (_container);
    Super.Add (internalManager);
    }

    public void add (field) {}
    _container. Add (field);
    }

    {} private field getMyTitleField()
    Delegated official = getDelegate();
    Field titleField = null;
    try {}
    titleField = delegate.getField (0);
    }
    {} catch (IndexOutOfBoundsException ioobe)
    //
    }
    Return titleField;
    }
    }

    class MainScreenWithBackgroundMain extends UiApplication {}

    Public Shared Sub main (String [] args) {}
    MainScreenWithBackgroundMain app = new MainScreenWithBackgroundMain();
    app.enterEventDispatcher ();
    }

    {MainScreenWithBackgroundMain()}
    Screen ExtendedCustomMainScreen = new ExtendedCustomMainScreen();
    pushScreen (screen);
    }
    }

  • How can I change background color on a pdf file?

    I am new to this, but I really want to learn. Help, please!

    Hi Tammy,

    First of all, you must realize that Photoshop is not designed to edit PDF files. If you want to somehow major you should really use Acrobat DC, I think Illustrator does as well, and even if I don't use InDesign, it can also. . Photoshop shines when the PDF file is the single image. You can save your work in Photoshop to PDF and retain the same quality and structure would have received you by using Photoshop's default save format PSD.

    That is, if you fill out the dialog box correctly.

    To keep the layer and channel structures, you must keep editing in Photoshop as it functions in the Save as PDF dialog box. Most of the PDF files created outside of Photoshop will not have been saved this way and will be opened as a single layer in Photoshop.

    Also, if you want your work to look nice you can afford to compress the image in the PDF file in jpeg format. Instead, you must use a medium without loss of compression. Like this

    Best quality don't re - sample at all. It is a little annoying, but should not be aware of these things to understand what you can and can't do.

    To actually change a background color without making a complex selection, you can do this.

    Excuse the product placement, it was just a PDF I was reading at the time. Hope that helps

    Terri

  • How to set the location bar search regardless of the selected search engine bar?

    The search in the address bar searches with the currently selected in the search bar engine with 23 FF. I find the annoying behavior, because sometimes I select different engines in the search bar, if necessary, but most often I just need to research that I make from the location bar wihout need to change the quick google search engine.

    Is it possible to customize the behavior, so that the search in the address bar still points on a single engine, regardless of the engine that is selected in the search bar?

    Hello tadolo, you can use an addon like https://addons.mozilla.org/firefox/addon/keyword-search/ to get the old behavior.

  • How to get the status bar along the bottom

    How is it that ALL the answers shown do not relate to my question?

    It is probably simple enough for someone who knows exactly what to do, please is there noone out there who can help me?

    What I want is my status back bar along the bottom... you should keep the relevant answers to the question

    In WLMail 2011, view tab, click status bar on the Ribbon.

    In 2009, WLMail, Alt, V, layout...

  • JDev 11.1.1.2.0: How to hide the status bar of the panelCollection?

    Hello

    We have screens very busy with many components of the table nested in Panel collection components.
    Thus we must 'own' to the top of our screens and one thing I want to get rid of is the facet statusbar on the collection of Panel element.

    Is anyway to force the facets DO NOT make?

    Thank you
    Mark

    Hi Mark

    See also thread 'af:panelCollection status bar problem.
    State AF:panelCollection bar problem

    success
    Jan Vervecken

  • How can I change the color of the status bar

    I would like to know how to change the status bar of the green with another color? The bar I'm talking about is the status bar when downloading or installation or uninstalling a program: I am running Windows 7 Home premium 64-bit.

    I don't think that there is a way to change unless you use hardcore theme packs. But I suggest you use those because they change file system and may make the System unstable.

  • Set the status of the project window - minimize maximize

    Hello

    Does anyone have an idea how to set the status of the project (and also diagrams vi) window using scripts.  I want to be able to ensure that this window is one to a decent size at any time - as otherwise labview tends to block everything behind it when you tab to another application.

    Looks like the State of the project window is read-only, and methods 'close window' and 'close' actually unload the whole project.

    JP

    Since you cannot do using methods of LabVIEW, a workaround I can think of is to use the operating system. For example, on Windows, you can use the Windows API. The functions of the API for LabVIEW Windows could be used for this.

  • How can I set different background color for the slider?

    Hello
    I want to set a different color for track Slider, slider track is spitted into two sections by slider-button.
    I want to put a left gray, the right of a white.
    Under css only changes the background of the entire track, but how I can change different background color for the slider?
    Any suggestion?
    .slider {
        -fx-border-width: 0;
    }
    .slider *.track {
        -fx-background-color:white;
        -fx-background-insets:  0, 1;
        -fx-border-color: #faf0e6;
        -fx-border-width: 1;
        -fx-border-style:solid;
        -fx-progress-color:yellow;
        -fx-border-radius: 20;
    }
    .slider.knobStyle:focused .knob {
        -fx-effect: dropshadow( three-pass-box , red , 5 , 0.5 , 0 , 0 );
    }
    .slider.knobStyle:unfocused .knob {
        -fx-effect: dropshadow( three-pass-box , red , 5 , 0.5 , 0 , 0 );
    }
    .slider .thumb {
         -fx-background-color:rgb(224,225,226);
         -fx-background-repeat:stretch;
         -fx-background-size:stretch;
         -fx-background-position:center top;
         -fx-background-image:url("../images/volume_ball.png");
            -fx-padding: 10;
    }

    I don't know why I can't get the node of the track, track has always set to null and the thumb or the other.

    After that the cursor was displayed on an active scene are you doing research?

    (ex.: after you have added the slider to a scene, the scene for scene, then called stage.show ())

Maybe you are looking for