field.setFont () seems to have no effect.

I try to have several AutoTextEditField which were the outcome of different font families.  To do this, I call FontFamily.forName then FontFamily.getFont () and then calling field.setFont () on the desired field.  While the options I convey in getFont(), height and style are working properly, the FontFamily is unchanged as the image below shows.

If I'm doing something wrong please let me know.

The source code for my program example is below:

   //MainScreen is the basic screen or frame class of the RIM UI.
        MainScreen mainScreen = new MainScreen();
        VerticalFieldManager vert = new VerticalFieldManager();
        HorizontalFieldManager hor1 = new HorizontalFieldManager();
        HorizontalFieldManager hor2 = new HorizontalFieldManager();

        FontFamily fontFamily1;
        try{
            fontFamily1 = FontFamily.forName("BB Casual");
        } catch(ClassNotFoundException e) {
                fontFamily1 = Font.getDefault().getFontFamily();
        }
        Font font1 = fontFamily1.getFont(Font.BOLD,14);
        FontFamily fontFamily2;
        try{
            fontFamily2 = FontFamily.forName("BB Millbank Tall");
        } catch(ClassNotFoundException e) {
                fontFamily2 = Font.getDefault().getFontFamily();
        }

        Font font2 = fontFamily2.getFont(Font.BOLD,14);
        AutoTextEditField field1 = new AutoTextEditField("Example1: ","Value1");
        AutoTextEditField field2 = new AutoTextEditField("Example2: ","Value2");
        field1.setFont(font1);
        field2.setFont(font2);
        hor1.add(field1);
        hor2.add(field2);
        vert.add(hor1);
        vert.add(hor2);
        HorizontalFieldManager hor3 = new HorizontalFieldManager();
        HorizontalFieldManager hor4 = new HorizontalFieldManager();

        FontFamily fontFamily3;
        try{
            fontFamily3 = FontFamily.forName("BB Casual");
        } catch(ClassNotFoundException e) {
                fontFamily3 = Font.getDefault().getFontFamily();
        }
        Font font3 = fontFamily3.getFont(Font.ITALIC,34);
        FontFamily fontFamily4;
        try{
            fontFamily4 = FontFamily.forName("BB Millbank Tall");
        } catch(ClassNotFoundException e) {
                fontFamily4 = Font.getDefault().getFontFamily();
        }

        Font font4 = fontFamily4.getFont(Font.ITALIC,34);
        AutoTextEditField field3 = new AutoTextEditField("Example3: ","Value3");
        AutoTextEditField field4 = new AutoTextEditField("Example4: ","Value4");
        field3.setFont(font3);
        field4.setFont(font4);
        hor3.add(field3);
        hor4.add(field4);
        vert.add(hor3);
        vert.add(hor4);
        mainScreen.add(vert);

        //We've completed construction of our UI objects. Push the MainScreen instance onto the UI stack for rendering.
        pushScreen(mainScreen);

There is no space in the name of the font.  Search for 'BBCasual' instead of 'BB Casual'.

Tags: BlackBerry Developers

Similar Questions

  • Creative applications update clouds seem to have no effect

    The application manager tells me to update some of my apps (Photoshop CC, after effects CC, multi-ad CC, CC bridge, Premiere Pro cc).

    Everything works smoothly, but if I check the application after the iMac Restart Manager - it tells me again to do the same updates.

    I've made the updates for a few days now, whithout any solution.

    I also tried to update to Photoshop, photoshops WorldShip - but that no longer works.

    Hello, Jeff!

    Suddenly, everything works fine and I am very happy to have all the available CC programs so that I can expand my possibilities also in video and design.

  • Variable of the ampersand in table XML seems to have no effect.

    Hello

    I'm trying to implement a trendline in a chart. I am follwing the guideline in this discussion:https://community.oracle.com/thread/2170766.

    If I add a text determined in the XML as follows:

    < axis_markers >

    <>lines

    < line start_value = '2725' end_value = "2735" color = "Red" / >

    < / lines >

    < / axis_markers >

    It works very well. However, the trend line should in Dynamics, that's why I generate the code in a hidden field.

    When I speak in the hidden field by adding in the XML of the chart like that & P3_HIDDEN_ITEM the trend line is not displayed.

    Inspect the XML that I see the malformed XML error and I see as always ' & P3_HIDDEN_ITEM ' is included instead of it'content.

    Can someone indicate possible reasons?

    Lothar G.f. says:

    I actually tried in several ways. Initialization of the element with a query and affecting the value after loading the page.

    Hello

    After the event the page, your region's load is already made.

    You must set the value of the item, before region for example using calculation.

    Try this.

    Kind regards

    Jari

  • How to increase or decrease the effect of an adjustment brush in Lightroom CC? In Lightroom 5, I could hover over the PIN and drag the two-way arrow left or right. This feature seems to have disappeared in the CC version.

    How to increase or decrease the effect of an adjustment brush in Lightroom CC? In Lightroom 5, I could hover over the PIN and drag the two-way arrow left or right. This feature seems to have disappeared in the CC version.

    I'll answer one of your three messages that asked this question.  If possible, please remove the other two.

    Hover and dragging moves the axis as it should.  The cursor turns into a hand to indicate the area brushed, it moves.

    Hover over the pin code, press the Alt/Opt key and drag left and right and the effect will become less and more.   The cursor turns into a two-headed arrow to indicate that the function of the drag has changed.  If you are not hovering over a pin code and press the Alt/Opt, then the cursor turns into a brush to erase to remove the adjustment every time you paint.

  • I tried to buy my book - DEFAULT TEXT - your book seems to have default text that has not been modified. Printed books will not include this text. This means all my text will not print?

    Using OSX El captain on a desktop iMac. iPhoto 9.6.1

    I tried to buy my book - this box appears - TEXT by DEFAULT - your book seems to have default text that has not been modified. Printed books will not include this text. Does this mean that all my text will not print?

    I've been twice now and change the text of Bradley Hand to the Blackboard to Helvetica Neue - which seemed to be the default. Message remains displayed. I don't know what else to do. This is my third book over the years, but the first with this problem. Can someone advise please?

    Thank you Davina

    It is not a problem of fonts. It is the problem of the sample text entered by the models.

    The error message means that there is a text field in your book which is still on show at the text included by the model, and you will need to replace this text with your text. This textfield might be hidden behind a picture.

    If you create a preview of the book, such default text is omitted. Have you compared the preview of what you see in iPhoto? Text that shows in iPhoto, but not in the preview will be such default text.

    For example, the section 'Topic of this book' on the flap back in some themes is a default text that should be replaced by your own legend:

  • I am running winXP home on laptop wireless via a router, and I continue to have an effect on the net.

    login procedure

    I am running winXP home on laptop wireless via a router and I continue to have an effect on the net, and a window saying I need to go through a certain procedure of connectivity in order to return on the net than what seems to come regularly and after that I went through the procedure, I'm back on the net could you please inform me how to eliminate this problem.

    Hi conorcloris,

    ·         What is the exact error message?

    ·         Did you do changes on the computer before the show?

    Follow the steps in the article.

    How to troubleshoot a network home in Windows XP

    http://support.Microsoft.com/kb/308007

    In Windows network connection issues

    http://support.Microsoft.com/kb/313242/en-us

    Troubleshooting Internet connection sharing in Windows XP

    http://support.Microsoft.com/kb/308006/en-us

  • Dynamic action - when the 'event' and 'condition' seems to have no sense

    Step by step, I am trying to get free Javascript coding so I can rely on what natively offers the Apex. It was an interesting experience, however I have noticed certain situations sicesdonneessontdisponibles options seems to have no sense, at least to date, and you will certainly help me which can be cleared up. I tried to put one of them into words. I just created a new dynamic action that will just set the focus to an element whenever my page is loaded.

    Why my new dynamic action allows me to choose the "Page loading" event and condition "sucks"? I don't understand why this combination is available. There is probably no effect anyway, but I decided to leave the condition "without condition."

    Thanks in advance.

    Franklin.Jr wrote:

    Step by step, I am trying to get free Javascript coding so I can rely on what natively offers the Apex. It was an interesting experience, however I have noticed certain situations sicesdonneessontdisponibles options seems to have no sense, at least to date, and you will certainly help me which can be cleared up. I tried to put one of them into words. I just created a new dynamic action that will just set the focus to an element whenever my page is loaded.

    Why my new dynamic action allows me to choose the "Page loading" event and condition "sucks"? I don't understand why this combination is available. There is probably no effect anyway, but I decided to leave the condition "without condition."

    It's just that there is a basic LOV status of one size for all types of events. Most of the conditions it contains is relevant to events associated with the elements. "Page Load" + "sucks" doesn't in fact make sense, but 'P4_END_DATE' + 'is null' fact. The Condition property remains visible and active so that the option "JavaScript expression" are available, as this can be used to make any event conditional.

  • I don't seem to have the presets folder to install the presets, anyone know why please

    I don't seem to have the presets folder to install the presets, anyone know why please

    Save an animation preset of your own from inside After Effects. This also creates the user preset animations folder. Then, you can install preset animations there.

    Using After Effects | Effects and presets animation presentation

  • I have after effects through creative cloud and I'm fighting to get the puppet tool. I learned that it's free.

    In CS6, it is a plug-in free and installed, but I can't seem to find it. Again, I have after effects through clouds.

    See after effects using:

    Using After Effects | Animation with the puppet tools

    Start here learn After Effects:

    http://Adobe.LY/AE_basics

  • Since W10 is released, Firefox seems to have been sabotaged.

    Since W10 is released, Firefox seems to have been sabotaged "voluntarily."

    Repeatedly, I asks me to change my default on firefox browser, despite the fact that it is long established as such.
    It runs much more slowly, with a lot more mistakes.
    I now get apparently screen continuous updating, making almost impossible email screen freezes when it "thinks".
    I now get messages of error of pursuit "(firefox ne répond ne pas) '."

    Hope you can do some alternatives.
    D

    Firefox 40, scheduled to be released next week, will have many patches of compatibility for Windows 10. I hope that will address several issues that you are facing.

    Since you seem to be an "early adopter" type person, you want to try Firefox 40 in his last days of tests?

    Note: Some extensions is perhaps not compatible with Firefox 40, especially the toolbars now of security which tend to be updated simultaneously with or shortly after Firefox versions.

    The following procedure will not remove your settings; don't uninstall NOT Firefox, that does not need.

    (A) download a complete Installer for Firefox 40 'beta' of https://www.mozilla.org/firefox/beta/all/ in a convenient location. (Scroll down your preferred language).

    Note: to retain the use of your plugins installed, I suggest the 32-bit version.

    (B) the release of Firefox (if any).

    (C) to rename the program folder, either:

    (Windows 64-bit folder names)

    C:\Program Files (x86)\Mozilla Firefox
    

    TO

    C:\Program Files (x86)\OldFirefox
    

    (Windows 32-bit folder names)

    C:\Program Files\Mozilla Firefox
    

    TO

    C:\Program Files\OldFirefox
    

    (D) to run the installation program that you downloaded in the #1. It should automatically connect to your existing settings.

    No improvement after this installation?

    Note: Some plugins can only exist in this OldFirefox file. If it is missing something essential, present in these files:

    • \OldFirefox\Plugins
    • \OldFirefox\browser\plugins

    When the final version of Firefox 40 becomes available (approximately 11 August), I propose to install this beta because will be auto-updated to Firefox 41 shortly after and unless you like software testing, maybe it's a little more adventure you are looking for.

  • Some Excel files download but do not show associated with Excel or seem to have no file name extension.

    Some Excel files download but do not show associated with Excel or seem to have no file name extension. If I download these files using Internet Explorer, they open properly. I can add xls or xlsx file and it will open properly with Excel. If I select the file open the 'Open with' dialog box and I If select Excel, the file does not open at all... nothing happens and Excel does not open. The excel in the picture as an attachment file are those where I added the excel file name extension.

    Unfortunately, the way that Firefox gives the name of file is more literal and less improvisational than Internet Explorer, you may need to add this extension .xls or .xlsx yourself from time to time.

    If you want to do it in the shortest time, you can change the immediate download to ask you where to save the file, which also foresees the possibility to change the file name. If you want to try it, the setting is described here: start-up, homepage, tabs and download settings.

  • Years, I used iPhoto to edit my images-Lighten/Darken, sharpness, contrast, highlights/shadows points. Now since I upgraded to OS x 10.11, pictures replaced iPhoto. Photos seems to have very little editing tools. What options now? Lightroom?

    For years, I used iPhoto to edit my image - sharpness, contrast, highlights/shadows, Lighten/Darken points. Since the update to OSX 10.11, iPhoto has disappeared, replaced by pictures, which seems to have very little editing tools. I am disgusted. What are the options should I now? A friend suggested using Adobe Lightroom.

    Use the Extensions:

    Read here: Edit your photos using third-party extensions in Photos for OS X - Apple support

    Search Photo extensions on the Mac App Store

  • Boot Camp: This disc seems to have been divided by another utility. It must be erased before installing Windows.

    I have a SATA Western Digital to 6 TB drive on my Mac Pro 2012.  I thought "what better place to put a bootcamp partition?  But when I went to use the Boot Camp Assistant, I was greeted with this:

    Boot Camp: This disc seems to have been divided by another utility. It must be erased before installing Windows.

    I thought ' OK - I'll delete data... Use utility disk to erase the disk completely, and then try again.  After a few hours, I used... completely partitioned disk utility disk and tried again.

    Same message.

    It seems that for some reason I can erase completely and use the entire disk for Windows (blah) or should I use another drive or not Boot Camp at all.  Is there a problem with the size of the hard drive Boot Camp can support?  Any advice?

    Hello ElPapa,

    Thank you for using communities of Apple Support.

    I understand that you want to put a Boot Camp partition on your Western Digital HD connected to your Mac Pro. What is your boot drive? If this isn't the case, it could be part of your problem. According to the following article on installing Microsoft Windows using Boot Camp, it is said that you need "at least 55 GB of free disk space on your startup disk".

    How to install Windows using Boot Camp

    If you install it on your boot drive and still get this message, take a look at this article: Boot Camp: alert message Partition when you use Boot Camp Assistant

    Best regards.

  • How can I create a smart folder. This option seems to have been deleted.

    In the past, I've created several smart folders and I find them very useful. Now I want to add another, but the option seems to have disappeared, because I don't see the Save button under the search bar in the library more.

    I'm on FF 27.0.1.

    Hello

    Please, see thisother thread:

    Thank you

  • I did a lot of smart folders, but they seem to have disappeared, what to do?

    I did a lot of smart folders, but they seem to have disappeared, what to do?

    You may have accidentally hidden albums.  The library panel Inspector hid 'Show' and 'Hide' controls to the right of the titles of 'Albums', 'Projects', etc.  Move the cursor to the right of the title 'Albums' and look if the albums will be displayed, if you click 'Show '.

Maybe you are looking for

  • Qosmio X 770: multimedia function backlit buttons does not

    Hello I've had my x 770 for about 6 weeks now and about two weeks ago that the function buttons multimedia backlit has stopped responding. The rear lights are always on but nothing happens when I touch them. I uninstalled and reinstalled the value-ad

  • Can I use Satellite P100-227 as a screen to watch Sky TV?

    Can I use my laptop as a screen to watch my spare sky box Sky TV. I'm with sky multiroom but don't want to set up a TV in the guest room, I want to just connect with laptop now and again. I don't want to use a TV just the signal from Sky box on my sc

  • With regard to all MIRACAST

    Dear Sir. I have computer laptop dv6 7013 cl, argues, WIDI or the function active wireless display, I mean the fact function Miracast suport, I windows 8.1 I want to share my screen on samsung smart tv but my laptop does not recegnize who... grace wi

  • Win XP pro. SP3. Update does not start.

    I got my newly installed Win XP PRO SP3. And when i lunch win update it's not running i tray wait but after a couple of hours i give up and shut down pc. If someone now what to do please help, need it for work.

  • content of lightroom6 do not buy cc and the adetude out of adobe

    When the upgrade of stand-alone version 5.7 to 6 lightroom do the possibilitys dehaze as wel?   as in cc?Adobe call centre doesnot answer this question more that they don't care if go cloud services. I don't like it sucks!Photoshop Lightroom