setTitle and setStatus

Hello

Is it possible to change the color of a title and a status of the black and white colors predefined by default?

At the minute, I have:

setTitle(new LabelField ("Premiership Menu", Field.FIELD_HCENTER));
setStatus(new LabelField ("Football ©", Field.FIELD_HCENTER));

I want to be Color.FORESTGREEN, if possible.

Thank you

Remove the last line (add (vfm)) - it is already added to the (apparent) State Manager.

In addition, you can do this with USE_ALL_WIDTH LabelField if you add the bit of style HCENTER (inherited from DrawStyle).

Tags: BlackBerry Developers

Similar Questions

  • Delete the title and status

    HII, I can delete any field using delete (fieldname), but I do not know how to remove the title and status (setTitle and setStatus), so please, how can I do?

    Try setStatus (null) and setTitle (null)

  • Which layout manager to use

    Hello everyone, I drove to the development of my application, I realized that the way in which I developed my application makes ony eyes straight on "BOLD" size screens. My footer is set to use all the way up, but what I really want, it of so he can "stick" to the lower part of the screen and let the section between the header and the footer to expand to fit the screen of the phone.

    The following example illustrates what I would do (arrow indicates there area I'd like to expand). Achieve will require that I write my own layout manager, or is there already a that I could use for this?

    Screen offers setTitle and setStatus. See http://supportforums.blackberry.com/t5/Java-Development/MainScreen-explained/ta-p/606644

  • How to make all the widget lost focus on any scrolling event?

    Problem: my button tooltips are dragged himself upwards and downwards and reworked on the screen when the screen scrolls.   There is a listener of scrollevent screen that should fire when the scroll event is happening, but it's not.

    Inside of my listeners to focus and scroll I have code that hides the displayed all ToolTips are off widgets development.

    So, why my scrolllistener is not shot?  It fires up when I do scroll by dragging the screen upward if my thumb is on a widge who accepts the update, but not when the affected widget can't receive the focus.  I partially fixed this by adding a mask manufacturers field for mae them focusable - but this seems to be a bug, is there a better way?

    Here's my interlocutor of the screen:

    this.setScrollListener (new ScrollChangeListener() {}
    ' Public Sub scrollChanged (Manager, int newHorizontalScroll,
    {int newVerticalScroll)
    setFocus();
    getActiveToolTips () .removeAllElements ();
    ToolTipMainScreen.this.invalidate ();
    }
    });

    Thank you

    PS: I use eclipse 3.5.2 last plugin, java last Windows XP pro 32 bit, JDE 4.7.  Pack 5 SIM, sim 9530 and real device 9550.

    Screen can be like that.  It has a hierarchy of managers, and I never know who is involved in this operation.  I can only imagine scrolling listener must be set on the manager returned by getMainManager(), but I'm not sure.

    To be completely safe, you can:

    1. create your screen with the explicit NO_VERTICAL_SCROLL indicator.

    2. Add your VerticalFieldManager(VERTICAL_SCROLL |) VERTICAL_SCROLLBAR) directly on the screen.

    3. Add the rest of your fields to this VerticalFieldManager. You can still use setBanner, setTitle, and setStatus for their intended uses, but never add anything directly on the screen.

    4. set all your custom goodies VerticalFieldManager - ScrollChangeListener, paint the background, custom, etc.

    This way control you as much as you can and don't count on the potentially changing nature of the screen.

  • Ask about the design of the system

    Hello

    I need to make a request that has the following requirements:

    1. The application begins with a screen that should be a list of say Supermarkets.I guess I must use ListField therefor (my assumption is correct?).
    2. When a user selects a supermarket, say KMart in the list, I want to show a list of departments of this supermarket.
    3. Select a Department from the list should show a list of products in the Department.
    4. Choose a product should show the details of the product.
    5. During all this navigation, I need to display a tab bar at the bottom of the screen. The tabs will be used to access the various features of the application such as the Search tab that can be used to search for a specific supermarket or a product. This tab bar must be visible at all times.
    6. I will use SqlLite as DB (wise decision or not?).

    So here's the scenario. Thanks for bearing with me so far. Now, here are the questions:

    • Can I move just a portion of the screen, i.e. the part that the list and not whole screen? I ask this question because I don't want the tab bar below to disappear no matter what.
    • Or, do I need to divide the screen into two frames, one for the bar tab at the bottom and one for the main content where lists will be displayed and whenever a list item are selected, I need to delete the current list and add the following list? Is this the right approach?

    If anyone has any suggestions as to how this problem should be addressed I can't wait you to read them.

    Much obliged.

    Hello

    My comments:

    1. the application starts with a display that should have a list of say Supermarkets.I guess I must use ListField therefor (my assumption is correct?).

    -> Yes, you can use listfield. I often use FlowFieldManagers with some fields extended to create another way to view information.

    2,3,4-> ok

    5. This can be obtained by adding your 'field of the tab' status (use setStatus on your screen).

    6. If you use sqllite you target users with OS 5.x, if that's the case is ok.

    With your questions:

    -> If you are using setStatus as I mentioned the tab bar used to disappear.

    If you want not the header disappear in some cases, use setTitle. using setTitle and setStatus your content will be in the middle. If you scroll the listfield title and status will remain in their place.

    Perhaps other developers have different ideas

  • Filling the space

    Hello

    I need a screen that displays text at the top of the screen and text on the bottom of the screen.

    Swing you can do with a BorderLayout, but y at - it an easy way to achieve this goal with the BB API?

    Thank you

    easy way would be to use setTitle and setStatus class screen, they offer built-in managers at the top and bottom of the screen. You can also use the absolute layout to position your fields or add a NullField with a given height (override getPreferredHeight)

  • Need help on ItemList

    Hi all

    I am very new to the blackberry development. I develop an application that has the list of questions. When the user clicks on any item in the list, it downloads a perticular file.

    Initially, I started creating the screen that extends from screen.

    I added the custom field to display the application name and logo.

    below I added the list of questions. items can scroll. the problem is, when I scroll through the list of items as the top with the application name and logo image also scrols along.

    How can I scroll oly the list items? I understand the uses of the VerticalFieldManager screen, I tried to create a new VerticalFieldManager and added a list inside. Even so, he has the same problem.

    Help, please.

    Thank you

    Anne Marie

    Welcome on the support forums.

    the simple solution is: setTitle
    See
    http://supportforums.BlackBerry.com/T5/Java-development/MainScreen-explained/Ta-p/606644
    For more details.

    or you create your screen with NO_VERTICAL_SCROLL, add some fields directly to it and a VerticalFieldManager with VERTICAL_SCROLL to hold your fields with scrolling.

    but for simple tasks, setTitle, and setStatus are nice.

  • ManScreen vice-plein screen

    I hope that I missed this somewhere else on the forums or in the documentation.  I wonder what are the differences between the screen and full screen? Is it wrong to have more than one class of the screen in a single application?  Are the benefits of performance using full screen on screen?  Thank you

    Welcome on the support forums.

    Screen offers, for example, a title area (setTitle) and a status area (setStatus).

    You can check the API for other differences in full screen.

    http://www.BlackBerry.com/developers/docs/5.0.0api/NET/rim/device/API/UI/container/MainScreen.html

    There is no difference in performance.

    generally, you use screen from time to time, it may be convenient to use the full screen instead.

  • Added drop-down list for the title bar

    Hi - I want to add a menu component from the 'title bar ' of my application.  Something very similar to that implemented in the Poynt application.

    I already gave up to use something similar to setTitle and have a horizontalFieldManager added to my request before I add a vertical Manager.  First, I added a label to my horizontal Manager field and that works fine, but when I tried (to test) to add an ObjectChoiceField he appeared on the next vertical row, not next to my text.  I'm quite lost when it comes to customize aspects of the UI of my BB apps.

    I suspect that the problem here is that, by default, the ObjectChoiceField will use the entire width.  You should limit its width, by substituting the layout and getPreferredWidth for the ObjectChoiceField.  Memory, a LabelField, will ask only for the width it needs.

    Here is an example that puts a DateField and an ObjectChoiceField in the title area.  I hope you can rework to meet your requirement.

    HorizontalFieldManager hfm = new HorizontalFieldManager();
    hfm.add(new DateField("Some Text: ",  System.currentTimeMillis(),
                    DateFormat.getInstance(DateFormat.TIME_DEFAULT)) {
        public int getPreferredWidth() {
            return 150;
        }
        protected void layout(int width, int height)  {
            super.layout(getPreferredWidth(), height);
        }
    });
    hfm.add(new ObjectChoiceField(" ",new String[]{"some", "text"} ));
    setTitle(hfm);
    
  • How to trigger two resources IOM task?

    Hello

    We have two resources of target.
    1 OID
    2.custom_resource

    The requirement is as in custom_resource, there is a task called "CreateUser". On the success or failure of the CreateUser task, we have to trigger a task of OID named 'SetStatus task. "
    What is well realizable OOB?

    The challenge face us is that, since the CreateUser (Customresource) and SetStatus (OID) are resources differrent can this be achieved within IOM or do we need to put some adaptations for this?

    Rehards,
    Naveen

    OOB is not possible. Better wite a code customized for call "SetStatus task" OID

    API tcProvisioningOperationsIntf.addProcessTaskInstance (long plTaskKey, long plOrcKey) use to launch OID task on the success of creating user response.

    addProcessTaskInstance (MIL_KEY, ORC_KEY); You can test with hardcoded a time value. and if it works then automate this.

    MIL_KEY - get table MIL (SetStatus task special key)
    ORC_KEY - nothing but the key resource of the DIO process instance. get the ORC table.

  • Verticalfieldmanager header and footer - how?

    Hi @all,

    I want to achieve something like this:

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

    |                    header                               |

    |                   no scroll                              |

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

    |               scrolling area.

    |                                                              |

    |                                                              |

    |                                                              |

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

    |                  footer                                   |

    |                  no scroll                               |

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

    I want to use an optimization of resources for the entire screen with noscroll

    to keep the other vfm 3 (one for the header and one for the scrollable area) and one for the footer.

    But how can I adjust the height of the optimization of resources 3 inside outside?

    Or is there another solution for this?

    Any idea will be very useful.

    Thanks in advance.

    CUA

    Michael

    Well Yes, there is a solution:

    for the header section, you can put your header inside verical SetTitle box Manager

    setTitle (headerManager);

    Add (BodyverticalFieldmanager);

    setStatus (footerManager);

    Please make sure that the bodyVertical domain manager must have vertical scrolling enabled)

  • Publish in the title bar and scroll field label

    Hi all

    I have a title bar and just below that I have a label field, I am facing a problem like as and as I scroll the lable field 'timezoneTitle' is not visible. His only visible when I scroll to the top. I want to keep it fixed even if the user scrolss up and down, how to handle this?

    LabelField title = new LabelField ("Welcome", LabelField.FIELD_RIGHT);

    HFM. Add (title);

    zone title
    LabelField timezoneTitle = new LabelField ("", LabelField.ELLIPSIS)
    | LabelField.USE_ALL_WIDTH | LabelField.FIELD_HCENTER) {}
    {} public void paint (Graphics graphics)
    graphics.setColor (Color.WHITE);
    graphics.setBackgroundColor (Color.BLUE);
    Graphics.Clear;
    Super.Paint (Graphics);
    }
    };

    setTitle (vm);

    Add (timezoneTitle);

    I'm not sure that I understand the question, or that the code you provided is complete, but if my interpretation is correct, then try this

    VFM VertticalFieldManager = new VerticalFieldManager();

    LabelField title = new LabelField ("Welcome", LabelField.FIELD_RIGHT);

    VFM. Add (title);

    zone title
    LabelField timezoneTitle = new LabelField ("", LabelField.ELLIPSIS)
    | LabelField.USE_ALL_WIDTH | LabelField.FIELD_HCENTER) {}
    {} public void paint (Graphics graphics)
    graphics.setColor (Color.WHITE);
    graphics.setBackgroundColor (Color.BLUE);
    Graphics.Clear;
    Super.Paint (Graphics);
    }
    };

    VFM. Add (timeZoneTitle)

    setTitle (vm);

    If this does not solve you problem, and in fact even if it is the case, I recommend that consult you this:

    http://supportforums.BlackBerry.com/T5/Java-development/MainScreen-explained/Ta-p/606644

  • Revisting the UiEngine and screen life cycle, just to be sure I understand why I'm short-term memory

    For arguments sake, let's say I have a UiApplication from where I have a class named MyScreen that extends the screen. MyScreen, I background of work and every time I push a new screen the setTitle is called with a different value.

    With this configuration, I push the following screens on the display stack using a menu that looks like:

    • Press 3
    • Press 2
    • Press 1

    And I create my screens as follows, depending on which menu item has its run method invoked.

    For screen 1 and so on...

    MyScreen newScreen = new MyScreen();
    newScreen.setTitle("Screen 1");
    
    MyScreen newScreen = new MyScreen();
    newScreen.setTitle("Screen 2");
    
    MyScreen newScreen = new MyScreen();
    newScreen.setTitle("Screen 3");
    

    But what happens if I select the item of menu 3 push again, then push 2 once again, my display stack looks like:

    • Screen 2
    • Screen 3
    • Screen 3
    • Screen 2
    • Screen 1

    That's why I have five instances of my object type newScreen MyScreen, correct?

    Each of these five instances of my newScreen object must go through the life cycle standard screen?

    The only method of onUiEngineAttached race twice whenever my newScreen object is pushed and pulled. attached to the true value when the battery display and attached is false when it is taken from the stack display?

    As a result, the screen stack above, onUiEngineAttached is called a total of ten times?

    protected void onUiEngineAttached(boolean attached)
    

    Todd,

    Your description fits what I understand to occur.  RexDoug is concerned that you do not create a new instance of your screen, but I think that you are, you have 5 instances of your screen, some with identical titles.

  • Integration of Facebook and Twitter

    Someone tell me how I integrate facebook and twitter into my application

    provide your suggesstion as soon as possible

    public class Home extends UiApplication
    {
        public static void main(String[] args)
        {
            Home app = new Home();
            app.enterEventDispatcher();
        }
    
        public Home()
        {
            pushScreen(new TwitterAPIMERIMOauthSample());
        }
    
    }
    
    public class TwitterAPIMERIMOauthSample extends MainScreen
    {
        private final String CONSUMER_KEY = "";
        private final String CONSUMER_SECRET = "";
        private final String CALLBACK_URL = "";
    
        public TwitterAPIMERIMOauthSample()
        {
            super(VERTICAL_SCROLL);
            setTitle("Twitter Demo");
            BrowserField browserField = new BrowserField();
            add(browserField);
            OAuthDialogWrapper pageWrapper = new BrowserFieldOAuthDialogWrapper(browserField);
            pageWrapper.setConsumerKey(CONSUMER_KEY);
            pageWrapper.setConsumerSecret(CONSUMER_SECRET);
            pageWrapper.setCallbackUrl(CALLBACK_URL);
            pageWrapper.login();
        }
    }
    
    public final class BrowserFieldOAuthDialogWrapper extends OAuthDialogWrapper
    {
        private BrowserField browserField;
        public BrowserFieldOAuthDialogWrapper(BrowserField browserField,String consumerKey, String consumerSecret, String callbackUrl,OAuthDialogListener oauthListener)
        {
            super(consumerKey, consumerSecret, callbackUrl, oauthListener);
            if (browserField == null)
            {
                throw new IllegalArgumentException("BrowserField must not be null.");
            }
            this.browserField = browserField;
            this.browserField.addListener(new BrowserFieldListenerOAuth());
        }
    
        public BrowserFieldOAuthDialogWrapper(BrowserField browserField)
        {
            this(browserField, null, null, null, null);
        }
    
        protected void loadUrl(String url)
        {
            browserField.requestContent(url);
            System.out.println("111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"+ url);
        }
    
        protected void loadHTML(String htmlContent)
        {
            browserField.displayContent(htmlContent, callbackUrl);
            System.out.println("22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222"+ htmlContent);
        }
    
        private class BrowserFieldListenerOAuth extends BrowserFieldListener
        {
            public void documentLoaded(BrowserField browserField, Document document)throws Exception
                {
                    trackUrl(browserField.getDocumentUrl());
                    System.out.println("33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333"+ browserField.getDocumentUrl());
                }
        }
    }
    

    HII All,

    I did twitter integration in blackberry but I got two times login

    Can someone help me how to remove the connection twice problem

    Above here is my code for the integration of twitter

    		   
  • The value of a field to the bottom of the screen without setStatus()

    Hello

    I want to set a field to always be at the bottom of the screen without using setStatus() as it is opaque. Most of the discussions I looked at have a complex layout on top to a field at the bottom. I have a very flexible presentation, now that I have just my fields added to the Senior Manager. Is there a good way to push a field to the bottom of the screen? Or is it only possible by substituting the functions of some manager?

    Ben

    It's not trivial.

    You must create a Manager and tell it to use all the way up and not be vertically scrollable.  So the dimensions that are placed in its sublayout will give you the height available to you.

    Now, you must add two managers to this Manager.  The first is that you'll add all you fields too - it will be a standard value, so that it scrolls.  The second will be the stuff you want at the bottom of the screen.

    In sublayout you will be setting page, the second field first, get its height and then set its position is at the bottom.  This will also give you the area that is available for your manager to scroll.  You will be then layout manager to say the things that he is restrcted to the height that you left.  As he scrolls will not worry.

    Finally, in sublayout, you will find setExtent making sure you use all the height that you were given.

    For more information:

    http://supportforums.BlackBerry.com/T5/Java-development/how-to-extend-Manager/Ta-p/446749

    http://supportforums.BlackBerry.com/T5/Java-development/create-a-custom-layout-manager-for-a-screen/...

Maybe you are looking for

  • Don't let me download apps

    Good name is Zeyda, lately I had problems to download apps and I don't know why. But whenever I try, he'd say "unable to download" Please help as soon as POSSIBLE. Thank you!

  • Disk capacity hard satellite 2550S

    Hello I wonder if Toshiba Dynabook Satellite 2550 S supports 40 GB HDD? If no, what is the maximum capacity of the hard drive can detect this laptop? Similarly, what is the graphics card for this device driver, I'm only using standard view type (disp

  • generation of impulses PXI-6602

    I am new user and I got pxi 6602 iwant to generate a 5 3.5ms amplitude 2.5 kHz and 2.5 offset I probably need to use 2 meters can someone tell me which wires I need to connect on CBS 68 device and how ican write this program?Thank you for helping me

  • HP DV6 WINDOWS 8 DRIVERS

    Hi, I have a Hp Dv6-6100SE. I don't want to take any chances. Just help me Get the drivers so that I can easily update my laptop for Windows 8. And another problem I have is that I can't save my dv6. Tell me how to backup and how much memory does! Th

  • Windows Update turn OFF my pc during the installation of the updates. now, I get into safe mode with network [error number: 0x8007043C]... .this which should I do to fix?

    Running dual core intel 1.83 cpu with 1 GB of memory. tried to update windows and microsoft security essentials. in the middle of windows update... firm pc... would not go to the office re-boot (got symbol very small windows sidebar)... in Windows Up