Change the background color of PasswordEditField

Hi all,

I am able to change the background color of an EditField by overriding the paint method such as:

    protected void paint(Graphics g) {
        g.pushContext(getExtent(), 0, 0);
        g.setBackgroundColor(Color.WHITE);
        g.clear();
        g.popContext();
        g.setColor(Color.BLACK);
        super.paint(g);
    }

It gives me an EditField with white background and black text color. However, the same code does not apply to the PasswordEditField. Does anyone have an idea why it does not apply to the PasswordEditField or other suggestions to change the color background and text PasswordEditField.

Thank you...

Hello

If you want to change your background color, you will need to override paintBackground(), no paint method.

Code for your solution,

Field of PasswordEditField = new PasswordEditField()
{
Protected Sub paintBackground (Graphics g)
{
g.setBackgroundColor (Color.BLACK);
g.Clear ();
}

protected void paint (Graphics g)
{
g.setColor (Color.PINK);
Super.Paint (g);
}
};

Tags: BlackBerry Developers

Similar Questions

  • How can I change the background color for the bar 'help file edit view history bookmark tools' in Firefox 29,0

    How can I change the background color for the bar 'help file edit view history bookmark tools' in Firefox 29,0

    You can add a theme of solid color to change the color of the top of the browser window, which contains the Menu bar.

    https://addons.Mozilla.org/en-us/Firefox/themes/solid

  • How I change the background color?

    This has been answered before, but for older versions of Pages with settings that no longer exist, and I can't seem to understand. How can I change the background color in the Pages?

    I inserted one rectangle and size for the cover page. I can't send to back, despite clicking on the button to do it, nor can I scroll with me instead of having to insert a new for each page, which would be much too tedious, even if I clicked "move with the text." What Miss me?

    Hi shockvaluecola,

    This rectangle selected, Menu > reorder > Section Masters > move object of Section Master.

    This context is displayed on each page of this Section.

    To remove the object of Section Master Menu > reorder > Section Masters > make Master objects selectable.

    Select (by clicking in the margin of page for me works), then delete.

    Kind regards

    Ian.

  • How can I change the background color of my iPad

    How can I change the background color of my iPad 1 5.1.1

    You can change the wallpaper via settings > brightness and wallpaper

  • First HP: Change the background color of a cell in the spreadsheet app (program)

    I created a very simple program to change the background color of two cells in the speradsheet application:

    First version of HP 2015 6 17. 8151 Rev

    1. EXPORT BGCOLORCHANGE()

    2. START TO

    3 STARTAPP("Spreadsheet");    Application of the open worksheet

    4 STARTVIEW (2,3);    in the symbolic view

    5 Cell (1,1,7): = RGB (0,255,0);    cell A1 green paint

    6 cell (1,2,7): = 31744;    red paint A2 cell

    7. END;

    PROBLEM: instruction 6 works, but section 5 only. Why?

    Thank you!

    The background color of worksheet uses 5 bits per color channel, then the function RGB() expects 8 bits per channel.

    The background color of worksheet can be calculated by: R * 32 ^ 2 + G * 32 + B where R, G and B are between 0 and 31 inclusive.

  • Change the background color of comments in numbers?

    Is it possible to change the background color of comments in a document of numbers?

    I couldn't find a way to do it on my iMac, but I managed to change the color of comments in a document of iCloud numbers, and now he's changed the background color of comments on the document of numbers on my iMac.

    You may have found the only access to the color of the note

  • How to change the background color of a text indicator?

    I have an ASCII/text indicator on my FP. FP uses a .png file as the background, with a block diagram. The diagram is a white background with lines black, figures, etc. I wish I could change the background color of the indicator of ASCII text / to white, so that it better matches the white background of the block diagram.

    LabView 2009 SP1 running.

    Thank you

    Have you tried the brush in the tool palette?

  • change the background color of specific table cell

    Hello

    I'm trying to highlight the cell when the max value occurs in the attached VI.

    In addition, as it is a secondary function, possible to change the background color of this specific cell?

    Thank you

    hiNi

    This?

  • How to change the background color of string programmatically?

    How to change the background color of string programmatically?

    Are you talking about string indicator and control chain? If so, right-click on a control/indicator of string and select Create-> property Node-> text-> text-> BG Color colors. Change to write and a number of the color you want to use phone.

  • How can I change the background color of the indicator

    Hello

    I want to change the background color of an indicator. (Yellow in the image as an attachment).  I would like to know, what property node manages this value so that I can wire a box of color to it.

    Thank you

    Jason

    Digital text > text colors > BG color

  • You can change the background color vi with a property node?

    I was wondering if it was possible in Labview to use a property node to change the background color of façade for an iteration, then back to an original color later. I don't think it's possible, but I would like to know for sure.

    Thank you

    Jody

    You can get the property pane directly node by right-clicking the scroll bar on the front panel and create-> property Node-> color pane.  Useful with multiple panes.  You can also click the property pane node in example of (imstuck) and choose link and then select the pane.

  • Change the background color based on the value

    I'm sure that this is a trivial question, but I can't seem to find the method to do it.

    I want to change the background color of an indicator according to its value.

    For example: if I have a set of say 123degF, I would like to the color of background color green if the value is either 1% or +/-2degF.

    Otherwise the color could be if above red and blue if under.

    I was able to schedule a psychic acomplishes, but with more than 50 indicators the interface gets quite busy.

    Santosh is correct. Here is a small example of the implementation of this code:

    I've also attached a copy of this VI, with the connected devices, so you can use it as a subvi if you wish.

    He takes input of temperature limit lower and upper limit. It then returns the value of the temperature, with the color of the indicator of change.

  • How to prgrammatically to change the background color of a 'number' inside a cluster control

    Hello

    using a property node, it is possible to change the background color of a control number.

    But how to do this, if this number control is inside a cluster? I would not have found the property to the background color (see attached vi).

    Thank you very much and best regads.

    Michael

    P.S.: I use a reference, because the color change must run inside a Subvi.

    Hi Michael,

    Insert a function "to the more specific" and connect the digital constant refnum. I modified a bit your vi.

    See attachment.

    Mike

  • How can I programically change the background color of a VI using another VI?

    Is it possible to change the background color of text of an indicator on the front of an a different VI VI?

    Hello

    You can programmatically change the front like that, code

    Can I programmatically change the colour of the façade?

    http://digital.NI.com/public.nsf/allkb/0DDBDB2FE2F54A5286256918006D7BB9?OpenDocument

    Then using VI Server, you can get a reference to VI on another computer to change it (or on the same machine)

    Hope this helps,

  • is it possible to change the background color of the checkbox control?

    Hello

    Is this possible in LV to change the background color of the checkbox system? When I try to do this via the Colors property [4] I get error 1131:

    LabVIEW: You cannot use this property with this control system.
    Property name: color [4]

    No, it's what are the control systems for. They adapt to the configuration of the machine.

    Use one of the other palettes if you want to change the color.

    Ben

Maybe you are looking for

  • When I try to download Firefox on my mac all that get is a black page and no way to get support.

    I got Firefox as my browser since Version. 3.2. a few weeks ago, he began to reject any page that had Adobe Flash rendering it useless. I guess that my copy of Firefox was bad for trying to replace it. Mozilla/Firefox wouldn't let me. So I got rid of

  • INTERNET RADIO no longer works amendment

    I have a touchsmart IQ504, Vista Home Premium.  I don't have the error messages, one day it was working fine, the other is no longer able to get stations.  I can listen to on my laptop, so it stations, it's my computer.  Thank you

  • How to use HDD recovery on Satellite L500?

    Hello I want to restore my Toshiba to factory settings. I tried to press F8 when starting Access menu of repair, but the Recovery Wizard is not an option.I tried pressing 0 starting up but no recovery Wizard it no more. I can see the file on the HARD

  • How to set a Total sum only for the newly added lines

    Hi Experts,JDeveloper 12.1.3.0.0Hi I have a table and above, I have an Add button. During the click on Add I only show new lines using CreateWithParams.Existing or rescued lines that I went under certain conditions as false. So, how can I calculate t

  • Can remove us a Promotion SO lines using oe_order_pub.process_order?

    Hello!We create SO headers and lines using the oe_order_pub.process_order API. One of the lines may contain an element with a modifier to promote existing, the API automatically adds items to Get to the lines of the SO. Our company requirement must r