Draw text with different fronts in a RichTextField

Hello

Is it possible to use a rich text field to draw different text in different fonts. I can change the color of the fonts by the function

graphics.setColor ();

in the painting method but I can't change the font.

Another thing... I want to create a line which contains several elements... like 2 bitmaps, 3 different texts, etc... I have manged to make horizontal use and vertical field managers... the problem is that it takes too long to make... and jerks... scrolling so I m using the paint function draw all these things in one control... but I can't seem to divide the text into two lines if the text exceeds the width of the screen... is it possible to do and does not affect performance.

Sorry for the long post...

Thank you

Found! Field of ActiveRichText!

Code following (not mine)

compensates for the int [] = new int [] {0, 5, 12};
Police fonts1 [] = new make [] {Font.getDefault (), Font.getDefault ()};
int bg [] = new int [] {Color.BROWN, Color.WHITE};
int fg [] = new int [] {Color.BLACK, Color.GREEN};
Byte [] attributes = new byte [] {0, 1};

mainScreen.add (new ActiveRichTextField ("Hello \nworld", offsets, attributes, fonts1, fg, bg, 0));

Tags: BlackBerry Developers

Similar Questions

  • LR3: Module presentation: how to create different text with different slides in 1 slide show

    I want to create a slideshow of my holiday photos.  I want to put a text box with the name of the place of the slide.  This means that different sidebars for different slides.  I just can't understand how I can handle this.  If I put a text box as it seems on al the slides.  If one just select several photos of the entire loading and adds text, it is still shown on all the photos in the slide show.

    Anyone know what I can do? Thanks for the help

    You must assign the text to different images in the metadata fields (caption, title,...) of the images themselves (best done in the library module). Then, add a text box in your slide show, do not use "Custom Text", but the metadata field you entered the information. You can even use the text template editor (by choosing "change... ") to select different metadata fields as those presented in the list.

    Gossweiler beat

    Switzerland

  • Resizing a paragraph of text with different font sizes?

    Hello

    I create a restaurant menu with a lot of text of different size.  It is a way to mass change the sizes of the fonts all at once?

    For example:

    Plate: <--(14pt et "BOLD")

    Rib eye of beef <--(12pt et italique)

    Beef tender Sirloin steak grilled with red wine sauce <-(8pt)

    Chicken Curry <--(12pt et italique)

    Chicken in a curry sauce <-(8pt)

    I would like to be able to reduce all 1pt lines in a go, is there a way to do?

    Thank you very much!

    JJTJ

    On such a project, you should set the paragraph Styles you want. Then, it's a simple matter to change Style definitions.

    JET

  • Build &amp; write to text with different column formatting

    3 days, I just pass on what appears to be a simple problem:

    I have a VI that reads a significant length TDMS file containing data sampled at 1 MHz 2-channel (very large files of course). The VI only runs 1 second at a time and looking for threshold crossing points and calculates the energy at this time there. In any case, I'm writing a text file where a column contains the number of the sample and the second column contains energy, annexed whenever the VI iterates (the number of rows generated by iteration may vary). It's simple by using the function 'Write to Spreasheet', the problem is I want a different format on each column. The sample number must be set to zero decimal and energy must be set on, say, 3 significant digits.

    A typical few lines should look like (delimited by tab characters, commas are there to represent the tabs):

    Time (samples), energy

    267935, 0.0000346

    545227, 0.000298

    1298655, 0.0000000122

    1314522, 0.00854

    'Write to Spreasheet' allows only a single format, so I have either a large number of DPs on my number of sample or energy value is 0.

    If I use 'Table in chain worksheet', I can set the formatting, but I can't seem to be concatenated, to build or to transpose the outputs in the right direction, no matter what I try.

    In the attached image I use Ch1 as my experience; CH2 using the traditional but unsatisfactory method "to write to the spreadsheet. The current VI returns on Ch1:

    Time (samples), energy

    267935

    545227

    0.0000346

    0.000298

    1298655

    1314522

    0.0000000122

    0.00854

    I hope that the image of the relevant part of the VI just go. I can reach the VI if necessary, but it seems unnecessary that I won't be able to share the data files for the tests.

    You can use the 'number of fractional string' primitive to convert data DBL to the chain with the required precesion. Then when you use this string 2D array and write in the file using 'write to the worksheet VI' it should work fine.

    If you still face any question please include the code with the data in a constant and registered in the 2012 version.

  • Search text with different appliedLanguage

    Then.

    All the documents I am train must be set to a specific language

    (for example. "German (reform in 2006)"). " However, sometimes during the import of text, mistakes happen and texts "jump" to another language (I got English, Romanian, Switzerland etc.).

    I need to create a (rapid) tool, which is any text that has a different language 'German' applied to this topic and indicates which page is displayed.

    Another iteration of each paragraph, each table and each note, I don't know. And the traffic of documents having 1000 + full text, it will take some time... can anyone give me another idea?

    Thank you very much!

    ~ Trevor ~ wrote:

    But I found the TRUE bug " for (c=0;c should become"

    "for (c=0;c-1;c++){"

    Quite a stupid mistake

    The script works really well now

    Oh dear, oh dear, oh dear!

    Now I feel really stupid, the 'real' bug wasn't a bug and

    « for (c=0;c was right.»

    -1 took off English: United States (do not know what is the difference between that and English: USA., as a Brit I never looked into it.)

    -1 has made a difference, my computer felt bad mood and caught himself the splwow64.exe thread.

    In any case, it seems to have cheered and now to reconcile with American independence.

  • I need a text with different values in different pages (e.g. Original, copy, confidential,...)

    Hello world!

    I have an invoice form that must be printed in triplicate, the first one with the 'Original' text in the lower right corner, the second with 'Copy' and the third with «*»

    I didn't ' t know how to get this...

    Thanks in advance

    Hello

    You can do the following:

    1. Create a master page with the fields of invoice / content on this master page, then
    2. Create 3 form pages that reference the master page, finally
    3. An each page, you can position the text labels 'Original', 'Copy', and ' * ' as you wish.

    I hope that the foregoing would be healpful for you.

    ARO

    Yasser

  • Is it possible to highlight the text with different colors in an outgoing message and if so how do you?

    There is really no other details. I just want to know if this is possible and if so, how it is accomplished.
    Thanx.

    This is as sophisticated as it gets. http://KB.mozillazine.org/Highlighting_in_messages

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

  • button with text of different size

    It is possible to have the text of different sizes on a single button?  Whenever I highlight a section, and change the font size, it changes the whole button.  I'm using labview 2009 and a guy at work has version 7.1 and with this version you can do it.  Any ideas? Thank you

    Instead of select part of the text you can copy paste the different size text and it will work

  • Displays a text ("sample application") Logo and Description ("this is a sample application") with different font size

    Hello


    I use the universal theme of apex 5.0 and tries to display logo text ("sample application") and description ("This is a sample application") with different font size.


    Type of logo - text

    Logo - sample application - this is a sample application.

    I want to display the description in the smallest font size, so I changed the Logo below

    Logo - < span style = "" are-size: 3.8 rem; ' > Sample App </span > - < span style = "" Dimensions are: 1.8 rem; "> this is a sample application </span >" "

    But I have following problem.

    1 - the font size for both is the same (why the size is not different?, because I gave the size of different font within the span tag)

    2 - the text of the whole logo whose description is displayed twice.

    -Once in place of the actual logo and

    -the second on the left upper tree navigation. (just below the text of the actual logo)

    I tried to use the logo attribute, but what makes the whole logo & its description with the same size. I need size of different font for both, so it is unusable.

    Attribute logo - style = "" are-size: 3.8 rem; ""

    Really appreaciate help.

    Thank you

    Deepak

    DeepakJ wrote:

    I use the universal theme of apex 5.0 and tries to display the text of the logo ("sample application") and description ("this is a sample application") with different font size.


    Type of logo - text

    Logo - sample application - this is a sample application.

    I want to display the description in the smallest font size, so I changed the Logo below

    Logo - application example - This is an example of application.

    But I have following problem.

    1 - the font size for both is the same (why the size is not different?, because I gave the size of different font within the span tag)

    Cannot reproduce. Using the code above results in different format text as expected. (He looks terrible IMO)

    2 - the text of the whole logo whose description is displayed twice.

    -Once in place of the actual logo and

    -the second on the left upper tree navigation. (just below the text of the actual logo)

    Including HTML tags in text in the 5.0/theme 42 APEX logos results in this behavior. I consider this as a bug as (a) it says nowhere that it is not possible to do so; (b) the text of the logo is not HTML - or attribute-escaped when used in the page.

    See How to avoid to show the logo on the navigation bar to get an explanation of the underlying cause and a workaround to allow the common use cases include the text and a picture in the logo. This particular solution is of no use here. The solution to this problem requires a custom with the theme the theme roller style sheet, which is the preferred way and support to customize and extend the universal theme.

    • Click the Thème Roller on the developer toolbar.
    • Expand the CSS custom section.
    • Add this style custom rule:
    .t-Header-logo a span {
      font-size: 3.8rem;
    }
    .t-Header-logo a span:after {
      font-size: 1.8rem;
      content: " - This is a sample application.";
    }
    
    • The page will automatically preview changes.
    • Click on record under and type a name for the style of custom theme.
    • Topic close Roller
    • I hope that decide that it is not a good idea and cancel the mods.
  • do 'padding' in buttons stay even with different length of the text?

    When manufacturing buttons is a way to make the "padding" to the right and to the left of the text a set size, so if you copy another instance of the button and put it in a different text that is shorter or longer, the fill quantity remains the same?

    You can see this top here;
    http://www.eBay.co.UK/?_trksid=M38
    Where is says 'buy' to 'sell' 'my eBay '.

    The default seems to be for the button to stay the same size to increase when the text so much is placed in it need to contain.
    Thank you

    Although everything is done in HTML. In Dreamweaver (or other editor), you can specify the CSS for the pad to the left and to the right of the text with a number of pixels and then fill the background with a repeated image.

    If I do a navigation based on image (where as your example is text based) I all set by hand. Sometimes, I'll create a 10px wide area, move to other text, then set the button located below appropriately. I then move on to the next button, and remove the box 'guide' when I finished.

    There are dozens of other ways.

  • How to draw text above a picture

    Hello

    How do I draw text above an image. It will work - substitution of the paint the field and using drawText (0, -10) method.

    -10 means that the text will be drawn 10 pixels above the image.

    It depends on the method you are using:

    If you decide to drawText in the charts (the hard), you would be better to check the length of the text before drawing it (getFont () .getAdvance (text), is what you will use for this), in the positioning of your custom field. This can become quite complicated, especially if you are concerned about the return to the line and other things.

    If you go to VerticalFieldManager approach and want the text field to wrap text properly, use, say, RichTextField for this BitmapField for your image and ensure that they have the style flags you can (for example, say, FIELD_HCENTER for centering them vertically; there are a of others, but you do not have to worry with them now) IMHO). In this way, that everything will be done automatically for you. And, as I said before, VerticalFieldManager respect the margins of fields.

  • Why is the text of different sizes?

    Hello

    The text with this browser shows different sizes of text on a web page? Some is normal, then some is tiny. I you pinch the page upward to read the small text, normal text is very large. It ruins the reading a web page. Why this happens, and can I do about it? It's especially hard when he's on a forum.

    Thank you.

    Hello
    This issue has been resolved, but have a lot of ideas suddenly something to help you

  • Receive the text with peak &amp; have to download it?

    Front of JB when we (by 2 with DRM) would receive a text with a pic we could tap or hold the pic view you or save a picture. On the DRM from my wife, she has only the possibility to download or delete with no overview of the attachment window. I looked in the settings of text and see nothing there. Mine still works as it did or similar to when I was on ICS. Any help would be grateful

    happy to help you. Be sure to choose the best answer if this solves the problem

  • Alignment of thread with different screen resolutions

    I noticed that block diagram wire positions/alignments can change, sometimes significantly, by switching to screens with different resolutions.  There is a ton of information on the maintenance of the proportions on the front panel as the solution of problems, but I can't find how to mitigate the problem with the wires on the block diagram.  Does anyone know how to best handle this?

    Thank you!

    crossrulz wrote:

    I never noticed the block schema change due to screen resolutions.  I saw this kinds of problems during the change of system fonts.  For example, switching from XP to Win7 meant go to police Aero, which is a font more great than XP used to its default system font.

    That's what I noticed as well.

    The solution is to set the blockdiagram fonts in the LabVIEW.ini be specific font rather than a system font.

    Something like

    BDFont = "Tahoma" 13

Maybe you are looking for

  • arsham_from_India

    Hello guys! I want an answer on my question, I'm NEW OWNER FOR MACBOOK WORLD that can my MacBook Air (13-inch, early 2015) OS X EL Capitan 10.11.4 version can run games like: -. 1. God of war 2 most wanted 2012 2 edition > > My information system are

  • Why the updates remove my options and search parameters

    The latest update deleted my home page, the options, and my Google search engine!Why are updated the cause? This will continue to happen in the future updates?

  • Can I upgrade my MacPro Xeon with new software?

    I have an older MacPro. The version of the software is Mac OS X 10.7.5. I want to do a completely new update. Is this possible?

  • Satellite L500-12 q - change or replace the graphics card

    Hey guys I'm new in this placeCould someone change or replace the graphics card on Satellite L500-12 q with a better game card? I searched the Web for a better card, but couldn't find any info on my laptop with the exception of increasing the perform

  • Can't use on my Satellite A100 Toshiba controls

    Hello! I have a Satellite A100 with Windows XP.The internet and CD/DVD buttons worked perfectly until a few days ago, nothing happens when I use them. I check their configuration, and it's ok.Can someone help me, please?Thank you!