text of style differently in listFied

I made a listfield allowing two lines of text to display for each line and also to display a block of color.

// set font        FontFamily font;        Font intFont = null;

        try{            font = FontFamily.forName("BBCasual");        }catch(ClassNotFoundException e){            font = Font.getDefault().getFontFamily();        }

        intFont = font.getFont(Font.PLAIN,16);            

..................

            graphics.setColor(Integer.parseInt(_colorStr[index]));
            graphics.clear();

            graphics.setColor(Integer.parseInt(_colorStr[index]));
            graphics.fillRect(0,y,40,40);
            graphics.drawBitmap(1, y + offsetY, icon.getWidth(), icon.getHeight(), icon, 0, 0);
            graphics.drawBitmap(screenWidth - 40, y + offsetY + 10, icon.getWidth(), icon.getHeight(), arrow, 0, 0);

            graphics.setFont(intFont);           

            // display Line 1 of Text
            graphics.drawText(_nameStr[index] , icon.getWidth() + 8, y,(DrawStyle.LEFT + DrawStyle.ELLIPSIS + DrawStyle.TOP), width);
            //display Line 2 of Text
            graphics.drawText("£" + _valueStr[index], icon.getWidth() + 8, y+20,(DrawStyle.LEFT+DrawStyle.ELLIPSIS+DrawStyle.TOP), width);

I have three problems.

(1) when I set the color for the rectangle which I paint it changes the color of the text.

(2) I would like to have a different style for each line, line 1, I want to be bold.

(3) is it possible to put a border around each line of the listField?

Any help with this would be much appreciated!

' 1) when I set the color for the rectangle I paint it changes the color of the text.

OK, there is only a foreground color.  Change to something else before your draw your text

"(2) I would have a different style for each line, line 1, I want to be bold."

Why not!  Just change the font that you use before the associated drawText

"(3) is it possible to put a border around each line of the listField?"

Sure.  Use drawRect

I guess that the code that you have shown us is in your drawListRow method.

Tags: BlackBerry Developers

Similar Questions

  • How to describe the text in a different color?

    How to describe the text in a different color?

    No need to simplify the layer - which causes the text that becomes uneditable as text.

    With the layer selected text, use the layer... Layer style... Style settings to open the settings of a dialog box for the text layer where you can select "Stroke" and choose your options for size, color, etc.

    Ken

  • I want to auto generate a word from a PDF document. Firstly, the OCR must identify the document. Then I want to be able to select the character 'areas' where the text will be different by document according to the document. Again, I want this automated pr

    I want to auto generate a word from a PDF document. Firstly, the OCR must identify the document. Then I want to be able to select the character 'areas' where the text will be different by document according to the document. Again, I want this automated process.

    We have many forms in our records. From these forms, we generate a list of documents that fully represents what is in the file. To create a list of accurate documentation of a specific file, I have to manually go page-by-page, extract specific information (they are in the same place) and the list of documents manually. I want to automate this process.

    The function of OCR in Acrobat does not 'zone' OCR.

    Server as "automation" is not supported by Acrobat (by license and by design). Acrobat is a desktop application, and so many activities can be "automated" via Acrobat JavaScript and Acrobat Actions (a feature of the 'Pro' version) a hot body will have to be available to keep things moving along.

    From what write you it's maybe that your specific needs would be better served by a category Server product. To research these remember Bing / Google is your friend.

    Be well...

  • You can move the inserted text to a different location on the picture, if yes how?  How can I put the character and the Panel clause up in the photo shop when you type test?

    You can move the inserted text to a different location on the picture, if yes how?  How can I put the character and the Panel clause up in the photo shop when you type test?

    Yes.  I find it easier to type text, and then use the move tool (shortcut V) (looks like an arrow) to place it where you want.

    To bring up the character and paragraph panels go to WINDOW > CHARACTER or WINDOW > PARAGRAPH.

    I hope this helps.

  • How to call hr_location_api.create_location to style different address with only fields that belongs to this style of address-specific.

    How to call hr_location_api.create_location to style different address with only fields that belongs to this style of address-specific. It should decide at run time indicates the time he will come to know the type of style of address and on this basis that the fields that belong to the details of the address mapped to hr_location_api.create_location calling.

    Thanks in advance.

    You can create a package wrapper above the API (hr_location_api.create_location)

    In the package wrapper, you set all values dynamically according to your needs (for example the style and add_line columns are filled on your requirements) then, you call the API.

    It doesn't work?

  • can I have different music (spoken to explain a slide text) for each different slide?

    can I have different music (spoken to explain a slide text) for each different slide?

    I guess it would be possible, but really it's not a function that can be done easily in Lightroom. I would sugest you look at applications that are designed specifically to create slideshows.

  • Set a style different cases for the same placeholder (data fusion) used two times in the same text

    Hello.

    I have a document with some parties updated with the fusion of data (via placeholders). Is it possible to set a style of different cases for the same placeholder in the same text. See the example:

    Mike runs its < < vehicule_placeholder > > in the city. But its < < VEHICULE_PLACEHOLDER > > is meant to be shared.

    If the value of this placeholder in the file merger is 'bike', the sentence should be:

    Mike runs his bike in the city. But his BIKE is meant to be shared.

    Is this possible? How?

    Thank you.

    You can do it. A character style for this configuration placeholder text, set in all caps.

  • Line style different generation - Word - report

    Hello everyone,

    I ask you to help for a little thing.

    I would like to set different style for a single line in the generation of reports - Word

    Example: Hello Labview

    I would also add a font color different for any word I want.

    Thank you

    Hello

    You can use the

    Word Format text VI

    http://zone.NI.com/reference/en-XX/help/370274E-01/lvoffice/word_format_text/

    Best regards

    NWO

  • Graphics &amp; styles styles text, status styles

    I'm really having trouble to get the point of graphic styles, paragraph styles, character styles.

    I just want to create a simple button with a centered text. (easy, simple)

    1.)

    I defined the shape of the buttons and the appearance of the text.

    2.)

    Now, I define the look and feel for different States, normal , hover , mouse down , assets.

    Is there a way to store this "CCS" style text (various States) and button (different States) in a style.

    rather than create several styles to the text and shapes and different States. (complicated( )

    Thank you.

    Hello

    You can add this status button in your library panel and can use it again in the future in drag and drop.

    Add this in the library made Panel right click on the status button > click on 'Add to library' > This will be added in the library with "Untitled" name Panel and later you can rename it by double click. (If you are unable to see the library panel, then you can activate Windows > library)

    Best part is that this library is accessible to any Adobe Muse site

    The library panel explained | Adobe Muse CC tutorials

    Concerning

    Vivek

  • Copy block of pasted text split over different video tracks remain linked

    I tried to find a way to fade and fade out text and came up with the following solution:

    It works:

    --Commencer start with an empty project, add a video clip (video 1 track)

    -Add a block of text by default to the video 2 track, accept the text by default, simply apply FadeInByLine animation

    -Add a block of text by default to the video 3 track, accept the text by default, simply apply the animation FadeOutByLine

    -Re-position the block of text to the video 3 track so he starts where the block of text in video track 2 ends

    Play your movie, the text fades in and out as it should. So, what happens if you do not want to have the text in the Center and you want it to have a different color or font, or style?

    Try this and this is where things get weird:

    --Commencer start with an empty project, add a video clip (video 1 track)

    -Add a block of text by default to the video 2 track and change the font color, also reposition the text somewhere on the lower left corner of the screen, then apply the animation FadeInByLine

    -Now, you don't want to repeat throughout all these stages of formatting, so duplicate the text block by copy paste (it will be pasted on the same track, both video 2 track)

    -Now drag the duplicated text frame the video 2 track to the video 3 track

    -Re-position the block of text to the video 3 track so he starts where the block of text in video track 2 ends

    -Apply the FadeOutByLine animation on the block of text on the video track 3

    Read your movie and you'll see that two blocks of text are the FadeOutByLine animation. If you change the animation of a block style, the same style will apply to the other block. They are still linked to the each other.

    Suggestions anyone?

    janionder

    For now I guess you have to first items 11, 12 or 13 on Windows 7, 8 or 8.1 64bits.

    You forgot a fundamental principle of the titration module. You cannot copy a title, change the copy without your changes to the copy in the original title.

    What you need to do, this is the original in the assets of the project right click and select duplicate. Duplicate will have a different name from the original... Drag the duplicate to the timeline

    and make your changes without simultaneously changing the text in the original to match your changes in the copy.

    Why you not only add a Fade In and Fade Out for the title, rather than text animators applying the way you have?

    With the closed titration module, right-click on the title on the timeline, select melted, then fade in video. Then, right click the title again, this time in video output.

    You will notice that the clip of two sets of white dots on the orange band that goes by the title, a set at the beginning of the title, and another series at the end of the title. Them are opacity keyframes. You can adjust these 'points' with the mouse cursor to customize your fades.

    If you do not use the double active project to avoid the titles of all ending up with the same changes, then just rename a title in the active project.

    Please consult the bulletin and review, and then let us know if none of this works for you. For any question or need for clarification, please let me know.

    Thank you.

    RTA

  • Styles different links in the body and the footer?

    Hello

    I want to style links for hyperlinks in the page footer, they are in the body of the site.  Is it still possible?

    The problem is that the body background is white, and footer background is dark brown. So there is no way that I can use the same styles for links.

    I know that there is no "Workaround" that connects the blocks of text, but this isn't what I want.

    Thank you!

    Matjaz

    Please refer to the Link Styles FAQ thread and apply different styles to your links in the footer and body.

    http://forums.Adobe.com/thread/982968

    Thank you

    Vinayak

  • Links to style differently in a div?

    Hello

    Using DW CS4 and CSS - I want to have a div with some links inside.

    So far I have style a: main links to view a rollover image.

    The problem is now when I add a link in the same div e.mail, or an image icon link to a page, they are treated in the same way as other links.

    Is it possible to treat them differently without putting them in a new div?

    Thank you very much

    Mark

    Markcronin123 wrote:

    Hello

    Using DW CS4 and CSS - I want to have a div with some links inside.

    So far I have style a: main links to view a rollover image.

    The problem is now when I add a link in the same div e.mail, or an image icon link to a page, they are treated in the same way as other links.

    Is it possible to treat them differently without putting them in a new div?

    Thank you very much

    Mark

    For a link to bear the title differently to the rest of the links when they are in the same container that you should apply to this link a css "class." You need to write some css to target the 'class' link in the

    (see below)

    a {}
    text-decoration: none;
    color: #C60;
    }
    #myDiv .linkColChange {}
    color: #039;
    }

  • I splilled li oquid liquid on my laptop, and now the text jumps to different places where the sentence and out Dyslexic...

    I Ispilled iced tea on my laptop keyboard area and now when I type, the letters jump to different areas of my text, I know its bc it wet spill of iced tea, but s antything here I CA makes type much more mormaelp, it is stil prblematic you can see.lly. o to fix it completely? The longest period of time that passes seems better.  As you can see... it's a perfect example of how my text and typing mess... and it's better that there is

    Someone knows how to fix this problem, so I can type normallt? I would be very grateful. for any advice. Thank you very much. BTW, it's a laptop from samsung. Not very old, I bought in May 2011

    Thank you, I'd be greafful for any help

    Try to leave the laptop open and off (not near a direct heat source) to allow any residual moisture to evaporate. If you had sugar in tea residue can be larger and more sticky and can make them less likely to return to normal without further intervention.

    If after a few days, it is still faulty, I suggest you get the keyboard professionally repaired/replaced.

  • Text prediction with different regional settings in Windows 7 - shows disabled in Korean

    prediction of title: original text with different regional settings in Windows 7

    Hello

    I have English as the main language and Korean as a language second.  Text prediction works very well with this configuration; However, if I change the regional settings (non-Unicode) in Korean, text prediction is disabled.

    There is no work around for this?

    Thank you.

    Michael

    Hello

    • Text prediction is only available in English, French, Italian, German and Spanish. To enable text prediction in a specific language, you must first install additional language files for that language. For more information, see install or change a display language.

    • Text prediction is not included in Windows 7 Home Basic Edition.

  • Problem with my developed consists of app and new text Message style chat window

    I developed an application to send SMS by the Invoke method, because I need the user to change the text according to the needs. But the new OS 5.0 update now brings a style chat window to compose the message and it does not show my text pre-loaded as before. How can I get through this new style chat window and see my text preloaded on the text to enter the field? My application is the OS 4.2.1 and higher.

    It has a bug in 5.0 with text in a TEXT which has been invoked.  It's probably what's happening.  See:

    http://supportforums.BlackBerry.com/T5/Java-development/OS-5-0-bug-invokeApplication-with-TextMessag...

Maybe you are looking for