setTextFormat() more than once on the same channel?

I try in vain to attribute a textFormat to two different parts of the same chain, but the second time, it does not record and remains the default text format. the two styles (regular and "BOLD") of the police are incorporated.

//Create Text Field
private function createAboutWindowTextField():TextField
    {
    var aboutWindowFont:Font = new AboutWindowFont();

    var regularFormat:TextFormat = new TextFormat();
    var boldFormat:TextFormat = new TextFormat();

    regularFormat.size = boldFormat.size = 12;
    regularFormat.font = boldFormat.font = aboutWindowFont.fontName;
    regularFormat.align = boldFormat.align = TextFormatAlign.CENTER;
    boldFormat.bold = true;

    var result:TextField = new TextField();
    result.antiAliasType = AntiAliasType.ADVANCED;
    result.autoSize = TextFieldAutoSize.LEFT;
    result.defaultTextFormat = regularFormat;
    result.embedFonts = true;
    result.multiline = true;
    result.selectable = false;
    result.type = TextFieldType.DYNAMIC;

    result.text =   "First Header\n" +
                    "Version 1.0\n" +
                    "Copyright © 2011\n\n" +

                    "Second Header:\n" +
                    "Other info";                                                       

    result.setTextFormat(boldFormat, result.text.indexOf("First Header"), ("First Header").length);
    result.setTextFormat(boldFormat, result.text.indexOf("Second Header:"), ("Second Header:").length);

    return result;
    }

the code above should result in the two "first header" and "second header:" become "BOLD", but only "first header" will be put in bold while "second header:" seems to be simply ignored. What is the problem?

I was told that it would be easier to use the style sheet / HTMLText, but I don't and I don't know if they said it is not possible to apply multiple instances of the same textFormat to a textField without using the HTMLText and style sheet, I'd find ridiculous if true.

somoene in another thread has answered this question.  the 3rd parameter in my setTextFormat is incorrect.  I was specifying a length not an endIndex.  I'm officially retarded.

Tags: BlackBerry Developers

Similar Questions

  • What type of eloqua email send should I use to send an email more than once to the same beneficiary?

    What type of eloqua email send should I use to send an email more than once to the same beneficiary?

    In the canvas on the box email, there is a parameter that must be checked in order to send the same e-mail several times for the same contact. Enable 'Allow emails to be retransmitted to previous winners' and you're ready.

  • Possible to insert more than once in the same table using multi table insert?

    I used multi-table insert before insert a source separate from the tables without problem.

    However, when I want to insert into the same table two or more distinct lines, I encountered a problem because when I call nextval on the sequence since this is the same sequence # will try to use the same number for two inserts, which will raise a violation of PK constraint on the 2nd insert.

    A way around this problem?

    Another option is to create the sequence with increases of 2 or however many tables, you are targeting.
    When you then specify the. NEXTVAL, you must subtract the relative number of it, apart from the first table that you insert in to.

    Something like that;

    drop table t1;
    
    create table t1 (a number, b number);
    
    drop table t2;
    
    create table t2 (a number, b number);
    
    drop sequence test_seq
    /
    
    create sequence test_seq increment by 2 minvalue 0
    /
    
    insert all
    when 1 = 1 then
      into t1 (a, b) values (test_seq.nextval, 1)
    when 1 = 1 then
      into t2 (a, b) values (test_seq.nextval  - 1, 1)
    select 1, 1 from dual
    /
    
  • Can afford you an Eloqua contact enter the same campaign more than once at the same time?

    I have a use case where a campaign on the Web has two different webinars to choose. If contact resumes the periods it only will allow them to follow a path. Y at - it a way to allow a contact of the two options, or it will have to be broken out into two individual campaigns in order t work properly? Thanks for any help you can provide.

    Unfortunately there is no work around that would touch even in one campaign several times. Both campaigns is the only option for this case.

  • How to repeat the same line more than once in the report 10g

    How to repeat the same line more than once in the report 10g

    If I print the barcode more than once
    in the report;

    Published by: user11106555 on May 9, 2009 05:50

    OK, thought it was just a recording, then try:

    SELECT COL
      FROM TABLE,
           (SELECT 1
              FROM DUAL
             CONNECT BY ROWNUM
    
  • How do I know if I have more than one of the same song in my library, and if I do how do I remove it without deleting both copies?

    Original title: Windows 7 Media Player

    How do I know if I have more than one of the same song in my library, and if I do how do I remove it without deleting both copies?

    Hello

    Duplicates would be revealed by the observation. If found you are probably followed the same
    record twice.

    Add items to the Windows Media Player library - see the monitoring records - and delete a folder
    controlled by the player.
    http://Windows.Microsoft.com/en-us/Windows7/add-items-to-the-Windows-Media-Player-library

    Remove items from the Windows Media Player library
    http://Windows.Microsoft.com/en-us/Windows7/remove-items-from-the-Windows-Media-Player-library

    Add or edit media information in Windows Media Player
    http://Windows.Microsoft.com/en-us/Windows7/add-or-edit-media-information-in-Windows-Media-Player

    The Windows Media Player library: frequently asked questions
    http://Windows.Microsoft.com/en-us/Windows7/Windows-Media-Player-library-frequently-asked-questions

    Getting started with Windows Media Player
    http://Windows.Microsoft.com/en-us/Windows7/getting-started-with-Windows-Media-Player#section_4

    --------------------------------------------------------

    The library may be corrupted if necessary, after the media library - advanced - restore tools above...
    Reset the library will result in the loss of all of the counties of game and probably both sides.

    ================================================================

    If you think there is duplicate in separate folders files:

    Here are a few utilities to help, be sure to remove duplicates once and good
    folder. If If doubt copy the file to another folder, delete and then check WMP.

    Here are several free utilities and they have all their benefits and their methods.

    Auslogics Duplicate File Finder is the MD5 search engine that allows you to find duplicate
    files content, without worrying other matching criteria. It would be useful, for example, when two identical
    MP3 tracks or video files
    have different names
    http://www.Auslogics.com/en/software/duplicate-file-Finder

    Easy Duplicate Finder - find and delete the duplicate - free
    http://www.easyduplicatefinder.com/

    AntiTwin - Installer and Portable versions - search files in double or similar-
    same binary - free
    http://www.Joerg-Rosenthal.com/en/antitwin/

    Fast Duplicate File Finder-Free - quickly find all the files in a folder and its subfolders duplicate
    http://www.Mindgems.com/products/fast-duplicate-file-Finder/fast-duplicate-file-Finder-about.htm

    Duplicate File Finder - Smart Port Forwarding - TCP Port Scanner - TCP Tunnel Port-
    Multi-minuterie-free
    http://www.brooksyounce.com/

    Duplicate File Finder software (pictures, mp3, iTunes)
    http://www.Moleskinsoft.com/

    SearchMyFiles - free - an alternative to the "Search for files and folders" module standard
    Windows. It allows you to easily search files in your system by wildcard, by last modification/creation/last accessed: time, by file attributes, by the content of a file (text or binary search),
    and by the size of the file. SearchMyFiles allows you to make a very specific search that cannot be
    done with Windows search.
    http://www.NirSoft.NET/utils/search_my_files.html

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" experience :="" bicycle="" -="" mark="" twain="" said="" it="">

  • BlackBerry Z10 Facebook presents more than once in the HUB!

    Dear all,

    I noticed that my Facebook showed more than once in the HUB! and all instance displays something different from each other. Past instances show old notifications that I deleted a long time ago!

    Whenever a connection and disconnection of the Facebook application, a new instance is created inside the HUB! It seems that there is a serious bug in the HUB or Facebook!

    How can I fix?

    found the solution here:

    http://forums.CrackBerry.com/BlackBerry-Z10-F254/two-Facebook-accounts-showing-hub-834878/

    Thanks to the FB developers!

  • Can transfer easily to be run more than once on the receiving system?

    Can transfer easily to be run more than once on the receiving system?

    I installed Win 7 on a separate XP drive and I am able to switch between them starting from their respective readers.

    I made an easy transfer between them and now intend to install it and test my programs on Win 7.  Once I've got everything working properly, and that all migration issues are resolved, I would like to make a clean second run Easy Transfer of XP just before the final switch to Win 7.

    "Clean run" I mean I want all the Win 7 system to be completely replaced by the new data and the parameters of the XP system.

    Easy transfer will do that?

    What I would recommend that you do, is create a new account user in Windows 7, then restore the backup Windows Easy Transfer in the new account and delete the old account that you created in the first place.

  • Import of Lightroom - Flash player appears more than once in the source and destination

    How can I remove Flash Player from the list of destinations and sources of import?

    I recently had considerable difficulties, download Flash Player to view the video from the site, but now it appears more than once in Lightroom.

    MacBook Pro El Capitan. Lightroom CC. Thank you.

    Those are probably your Flash installation disc images.  You see them on your desktop.  If so, drag them to the trash.   If they are not on your desktop, restart your computer and may disappear from the import dialog box.

  • How can I get a sound to play more than once using the Commons of edges?

    Hi, I'm very new to all of this; If Mylène so ask dumb stuff...

    I used successfully the communes of edge to get an audio effect to play on a timeline, but it will play only once. Anyone know how I can get it to play again at various times of relaxation?

    The code I use in creationComplete is:

    yepnope({
              load: "http://simonwidjaja.github.com/EdgeCommons/live/EdgeCommons-0.7.1.js",
              callback: function() {
    
    
    
    
                        // Load sound manifest (e.g. in creationComplete)
                        var assetsPath = "media/";
                        EC.Sound.setup(
                            [
                                  {src: assetsPath + "bubbles.mp3|" + assetsPath + "bubbles.ogg", id: "bubbles"},
                            ],
                            function(){ EC.info("Sound setup finished", "DEMO"); }
                        );
    
    
    
    
                  }
    });
    
    

    I then in a trigger on the timeline:

    EC.Sound.play("bubbles");
    

    As said, plays the foregoing, once... but if I place another, 'EC. Sound.Play ("Bubbles");' trigger further along the scenario, nothing happens. Similarly, if audio has already played and the lines of the timeline, the audio will not play a second time. I think I have to write in certain kinds of "unload" kind of thing, so he can play again when it hits the new trigger? Or I could just talk to Cobblers? Who knows? I certainly don't have which is why I desperately need help... Please x

    Have you tried to put the code to specific locations in the timeline?

    Here's a samlpe:

    https://www.box.com/s/3cf7sh7mtwzpvfqmynt1

  • Thunderbird will download more than 1 email (the same on &amp; more) when I have 2000 + listed as new and ready for download.

    I just noticed what is happening and need help I'm talking to a company related to a new position.
    Help, please.
    KeV

    Try to connect via webmail and delete the message that is stuck.

  • Score editor {} why a musical note appears more than once when the key was pressed only once? (Image)

    Thus, for example, ringed RED notes are not affected at this time there, then why they arise after the GREEN circled notes, which are affected. It has to do with the length of the MIDI note or sustain? (I have the pedal which is held for the entirety of the song)

    Note, I'm seriously new whereupon on sheets of music, so I apologize if it's both obvious and a very simple solution. Thanks for the help!

    This has to do with the length of the midi note. Make sure you play on a click track (turn on the metronome) and slow down a little if necessary (tempo).

    Also turn on syncopation to eliminate some of the links and according to your needs... set the quantize to a lower value for example display 8.  You define quantize for the smallest value you want to play (if its 8th note - 8, then black - 4 then - sixteenth note 16 etc.).

  • I get "proxies cannot be captured by a stateless session" when I try to log in to this site. I went there there more than once in the past, but this is the first time I received this answer and you are unable to log on to this site.

    I've logged on this particular site, http://www.springairsystems.com/SpecAndQuote/User/Login/View.aspx a number of time's recent past. When I try to log in now, I get a prompt in red letter indicating, "proxies cannot be captured by a stateless session." What should I do to open a session? I set my privacy settings to allow cookies from Firefox, but is not alleviate the problem.

    See this - http://en.wikipedia.org/wiki/Proxy_server

  • Is it possible to find the two sentences into one pdf file? For example, I know the words 'Here' and 'the answer' occur more than once in my document, but only once on the same page. I'm looking for this page.

    Is it possible to find the two sentences into one pdf file? For example, I know the words 'Here' and 'the answer' occur more than once in my document, but only once on the same page. I'm looking for this page.

    I tried to do this by using the search but it will find only them, if they occur as a long chain, that is to say "Here's the answer" rather than how they occur in the document it is to say "Here 's" a bunch of information that leads you to 'the answer'. The search feature so standard did not help.

    Then I tried to do this by using the tool to delete (obviously not the application of writing!) because it allows me to search for multiple words or phrases, however it is not highlight what page both are found. I tried to turn on the preference to enable deletions of comments and even if it meant that I could then go through all the comments, it's still not faster than my document is more than 1,000 pages, which meant there were too many total comments for me to be able to easily identify which page had both.

    Any ideas?

    There is no built-in way to search for two strings and limited to show only the results that appear on the same page.

    It can be done by using a custom script, however.

  • Help! CC of PHOTOSHOP: I want to reproduce the same project more than once and to modify their dynamic objects linked separately as different projects - can you help me? Please

    I want to reproduce the same project more than once and to modify their dynamic objects linked separately as different projects - can you help me? Please

    If related files please consult are located next to the file that contains the duplicate folder and edit files duplicate so corresponding should translate into changed content in the file duplicate.

Maybe you are looking for