How to change the font color

as in the subject...

I have a class that extends the VerticalFieldManager and paint method:

 

public void paint (Graphics _g) {}

Super.paint (_g);

_g.setColor (Color.Black);

_g.fillRect (0, 0, getWidth(), getHeight());

_g.setColor (Color.Red);

_g.drawRect (0, 0, getWidth(), getHeight());

}

So what I have is a black rectangle with red edges.

later in another part of the program, I make an object of this class and I want to add a TextField to write to him. the problem is, the font color is black and is also the background of my rectangle. I want to change the font color in the TextField in white, but I have problems. I tried to crush paint method as follows:

_Tf TextField = new TextField() {}

Public Sub paint (Graphics _g)

Super.Paint (_g);

_g.setColor (Color.White);

}

but it won't help.

Anyone know how to solve?

concerning

Make the call to setColor before calling super.paint (...).  Although you might need to save/restore the current color

{} public void paint (Graphics g)

oldColor int = g.getColor ();

g.setColor (Color.WHITE);

Super.Paint (g);

g.setColor (oldColor);

}

The color setting is perhaps an exaggeration, but you can play with it.  I remember in the past where I had put the red label text, then a bunch of controls designed after it was all red.

Tags: BlackBerry Developers

Similar Questions

  • How to change the font colors in the communities of support?

    How to change the font colors in the communities of support?

    Thank you

    Press or click on use the Advanced Editor in the upper right of this text block which will take you to it.

  • How to change the font color of taskbar

    How can I change the color of the font of the taskbar? The white letters for minimized windows are impossible to read.

    Hello cheesechief,

    Thank you for visiting the Microsoft answers community.

    As SharonMary has previously said, there is not a configuration option to change the font color in the taskbar. Although there are many third-party applications that can help you accomplish what you're after, simply start looking for them.

    Hope this helps

    Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk

    Chris.H
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to change the font color under block Action workflow history?

    Hi all

    How can we change the font color to Blue(see attachment) to the Red under history of Oracle Workflow Action block.

    In my scenario, the user has launched good order to the approver. He goes to the first approver. First approver enters his observations and approvers it. PO goes to the second approver for approval. now when the second approver opens the notification, it should be able to see the comments made by the first approver in red instead of blue.

    In short every time that comments are those should visible in red once stored.

    SR.png

    Try to set the CSS class.

    I do not remember exactly where this region is generated. Check the Message in the workflow and see how this region is rendered.

    If it's HTML, you must define tags, if there is an OA region, you must customize the OA region and add a CSS class on the ground.

    See you soon

    AJ

  • How to change the font color in live movie maker 2011

    I'm used to using movie maker on vista, but this movie maker is very different.  I need to change the font color...

    Help, please

    There is an 'A' with the word 'Police' below it... left up until it clicks.

    See the following links:

    Windows Live Movie Maker to add titles & credits
    http://windowslive.com/Tutorial/MovieMaker/TitlesCaptionsCredits/video

    Video 101: Adding text & titles with Windows Live Movie Maker
    http://Vimeo.com/videoschool/lesson/29/video-101-adding-text-and-titles-with-Windows-Live-Movie-Maker

  • How to change the font, color line, column and Grand Total labels in PivotTable

    Hello Guru

    Can you get it some one please let me know how to change the look and feel of the reports in Pivot table using css files. I want to have the dimension and the measure to be of different color columns and grand total different color. I want to achieve for all pivot table reports instead of manually change each report so I want to do in css files.under s_SRIKI\b_mozilla_4\views.css I've seen a lot of options but nothing has worked. So can you please exactly tell what class we need to change to make changes. Thank you!!!

    Thank you

    SR

    For values

    . OORT {}

    text-align: right;

    vertical-align: top;

    color: Red;

    }

    For the product if you got hyper link

    Code OOB is

    . PTL {}

    color: #039;

    text-decoration: none;

    cursor: pointer;

    }

    If brand aid

  • How to change the font color in the legend boxes in Adobe Reader 11?

    I can change the color of the border of the box, but not the color of the text inside. If I right click on the text, it will allow me to choose bold/italic, etc but not the color. A right-click when I select the area allows me to change the color of the border or the background fill, but not the police. I'm used to be able to do this until I upgraded to Player 11, but may not know how to do it now: there is no option from the toolbar menu more!

    Select the text and press ctrl-e.

  • How to change the font color in a title?

    Hi all

    Sorry for the real noob question.  I'm making a video and inserting a few titles.  Finally, I get the hang of some of these.  But for the life of me, I can't find a way to change the color of the fonts in the titles.  Are we stuck with the color of the font in any particular title or y at - there a way to change this.  (First 10 for Mac items.)


    Thank you!

    In the Titler (double click on your title to load it in the Titler), select your text with the Selection tool (the arrow) by clicking in the text to get the bounding box, or drag the text in the text tool. Now, if the text. Look in the Toolbox of titration for the little artist palette, then click on about it. Choose the color from the Color Palette.

    Good luck.

    Hunt

  • How to change the font color or the background color of the field date. MinValue based on its value

    Hello world

    jdev Studio Edition Version 11.1.2.3.0.

    I have a date field of the entry in the table of the adf. I want to change its color (font or background) if the date is less than the current date.

    I use jdev Studio Edition Version 11.1.2.3.0.

    Thank you

    You must have a date property in a bean that allows you to get the current date. That you can use in a for EL compare to the date in the table and set the inlinestyle as accordingly

    #{lt mybean.currentdate row.datetocheck?-color: Red ":" "}

    mybean. CurrentDate is the method that returns the current date of the bean method.

    Timo

  • How I change the fonts and colors of default return?

    I changed the font and the color of the text through the Tools button and the button options and the tab content. I can't find anything tell me how to change the fonts and colors to the colors and fonts by default. Can you advise me? I use Windows 7 Home Premium OS. Thank you.

    Hi Brenda19605,

    You can use this article to set the fonts and colors: https://support.mozilla.org/en-US/kb/change-fonts-and-colors-websites-use?esab=a & s = do & r = 0 & s = as

    The default settings for the police are in this article:
    https://support.Mozilla.org/en-us/KB/some%20text%20shows%20up%20bold%20after%20upgrade

    Unfortunately for the default color has no good reference. For the text, but it is black (most lower-left), the background is white (color above left). Unvisited links is blue (column 8, line 5) and the visited link is purple (column 9, line 5).

    Let me know if you need help more!

    Lordfreak

  • How can desktop icon font color - I change the font color of the text that describes the desktop icons?

    I am running Windows 7 Ultimate 32 bit. How can I change the color of the font describing the desktop icons?

    I am running Windows 7 Ultimate 32 bit. How can I change the color of the font describing the desktop icons?

    Hello

    You cannot change the font color of desktop.

    Because desktop wallpaper images have different colors, it is easy for the colors of unreadable fonts if they are on top of the same color in a background image to display. For example, a black font on top a dark part of the background image or a white font on a white part of a background image.

    The desktop icon fonts are dynamic and show white on dark background and change in white with a shadow effect black on a light background.

    I hope this helps.

    Thank you for using Windows 7

    Ronnie Vernon MVP

  • How can I change the font color in Notepad?

    Hello

    How can I change the font color in Notepad? I recently saw a .srt file that shows the different font colors and when I opened it in Notepad, it appears from fonts to black as usual... ! The advice in this regard will be appreciated... !

    You cannot change the font color in Notepad. Why not use the WordPad integrated, or one of these freeware programs 'Office Like'.
     
     
     
  • How can I change the font color? I have no option "color" under "format".

    How can I change the font color? I have no option "color" under "format".

    Hello

    There are several ways to do this-

    1. for font color, you can use the CSS section in the Inspector (Windows-> property) properties.

    2. you can set the style inline in Code view (for example it is paragraph

    3. you can use CSSD to add a switch and set color property in the section of text.

    Thank you!

    Kusha

  • How do you change the font color in CALL coming OUT of the text boxes in PRO XI?

    How do you change the font color in CALL coming OUT of the text boxes in PRO XI?

    Select it and press Ctrl + E to open the properties bar where the first

    option is the color of the font.

  • How can I change the font color on incoming emails

    I would like to change the font color from black (default color) to a blue color on incoming and outgoing emails.

    Hello


    1. What mail client do you use? Is - this client is Microsoft outlook e-mail or on the web?
    2. who is the operating system that you are using?

    If you use Microsoft Outlook client see this link for more information:
    Automatically change the colors of incoming message and fonts based on the sender, subject and beneficiaries
    I suggest you to give us more information, so that we can better help you.

    I hope this helps.

Maybe you are looking for