Cannot focus on a Manager

Hello

I have several fields (an EditField and a ButtonField boarded a HFM) followed by a value for money with 3 HFM. Each of the HFM 3 have a set of labels that I put their style to be NON_FOCUSABLE. What I would like is to allow the user to FOCUS on the individual HFM. I know I'm recreating the functionality provided by the ObjectListField or ListField, I just want to create myself. The problem I have is that when you scroll the screen, I can not restore the focus beyond the ButtonField. I have not implemented a drawFocus for one of the HFMs, but at least if they received the focus, I would expect in the ButtonField to lose focus.

The information in this thread is correct?

Thank you.

Component Pack: 4.5.0

Simulator: Curve 8300

Thanks for your reply Peter.

Here are two ways to go about this... I don't know if the first is as clean as the second, but it is more direct in appearance.

// Method 1

TermManager termManager = new TermManager(FOCUSABLE) {
  protected void drawFocus(Graphics graphics, boolean on) {
    graphics.setColor(Color.YELLOW);
    graphics.fillRoundRect(0, 0, getWidth(), getHeight(), 6, 6);
  }

  protected void onFocus(int direction) {
    // onFocus for a Manager is called, but it does not call drawFocus, so we force it.
    drawFocus(getScreen().getGraphics(), true);
  }
};

// Method 2

// add a focusable NullField and draw the Manager's focus that way
NullField nelly = new NullField(FOCUSABLE) {
  public void drawFocus (Graphics graphics, boolean on) {
    // draw focus for Manager of this field.
    graphics.setColor(Color.YELLOW);
    Manager myManager = getManager();    graphics.fillRoundRect(myManager.getBorder().getLeft(),
                           myManager.getBorder().getTop(),
                           myManager.getWidth(),
                           myManager.getHeight(), 6, 6);
  }
};

termManager.insert(nelly, 0);

// add to Screen
insert(termManager, index);

invalidate();

Hope this helps someone. And please comment on my use of getScreen () .getGraphics () or something else.

Tags: BlackBerry Developers

Similar Questions

  • Cannot run the Task Manager

    Cannot run the Task Manager. I right click and select from the list, but nothing happens.

    See: Why won't Task Manager, REGEDIT and MSCONFIG disappear when opening?
    http://WindowsXP.MVPs.org/ToolsQuit.htm Harold Horne / TaurArian [MVP] 2005-2011. The information has been provided * being * with no guarantee or warranty.

  • How to control the Focus in landscape Manager.

    Hi friends,

    I have a small doubt to control focus on the Manager.

    in my third-party application, I add two fields at Horizontalmanager and that the Manager (Manager level) to the Manager of the vertical. so when I scroll first means down development is the first field to the entire screen. next time, I scrolled to the top of the bottom, then the focus is on the last field. here what I want is from bottom to top that will focus on the first field not a last field. How to do this.

    Please help me friends.

    Thanks in advance.

    Thank you simon_hain,

    Are finally corrected this problem.

    Here I'm just my managers onFocus method substitution.

    TO

    super.onFocus (1);

  • ORA-12913 cannot create the dictionary managed during import tablespace

    Greetings,
    I'm a newbie om moving databases between servers.

    I get the following error: "ora-12913 cannot create tablespace dictionary managed" when executing the data pump import. It is a 10.2.0.4 database that I'm moving from HP - UX PA-RISC to HP-UX-Itanium. It seems that all managed tablespaces locally were ok. Some of the successful dictionary tablespaces had problems (DRSYS, INDX, RBS, TOOLS)

    Should I convert all tablespaces dictionary managed locally managed tablespaces before data pump export/import? Note that this is a very small database with little use, then what better practical performance I'd like to hear.

    Thanks colin

    Published by: YJC on Aug 17, 2010 15:16

    >
    (1) should all be converted to Locall managed?
    (2) can the RBS safely deleted, given that an UNDO tablespace that uses the DB.
    >

    Only the SYSTEM will have to be migrated to managed locally. The RBS tablespace can be deleted if there is a separate UNDO tablespace and the database uses undo automatic management.

    HTH
    Srini

  • Cannot start a process managed after the attempt limit maximum

    Hello

    Get the following error

    / app/oracle/product/101202/opmn/bin (OID) > opmnctl startproc ias-component = OID
    opmnctl: from opmn managed the process...
    ================================================================================
    opmn id = smtest02:6202
    0 out of 1 process started.

    IAS-instance id = infra .smtest02
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    IAS-component/process-type/process-set:
    DIO/DIO/DIO

    Error
    -> Process (pid = 26032)
    Cannot start a process managed after the attempt limit maximum
    Journal:
    / app/oracle/product/101202/opmn/logs/OID ~ 1


    Any suggestions

    Thank you
    Kedar

    Hello

    The deadlock problem in your journal that happens because the database user SCOTT has his account has expired or locked.

    To resolve this issue, you will need to:

    1 unlock the account with the command

    ALTER USER SCOTT ACCOUNT UNLOCK;

    2. set the password for SCOTT with the command

    ALTER USER SCOTT IDENTIFIED BY TIGER;

    3. confirm the status of the account with the command:

    Select the username, account_status from dba_users where username = 'SCOTT ';

    I hope that this will help solve your problem. I need to go to sleep now here, it's already after 01:00.

    See you soon,.

    Francisco Munoz Alvarez
    www.oraclenz.com

  • Tecra R10-111: cannot install the Wireless Manager

    Hey guys,.

    don't know why, but when I install the Manager wireless on my Tecra R10-111 Wireless Manager can be started, but not a second later, the program ends. The only option I have is to accept and put an end to the program press OK.

    I have two versions of win7 on my laptop.

    1 is the original version of Toshiba Win7 OEM, who has been on the laptop.
    --> Here, it works without probs
    --> All updated etc.

    2. is it a full Version of Win7 bought and downloaded in a microsoft store.
    --> Here it doesn't work anymore!
    --> All updated etc.

    Earlier Versions of the Wireless Manager has worked in two partitions with Win Vista and for some time, I remember that he has worked with both versions of Win7.

    What is the problem with that? Toshiba has to provide updates and drivers that work with any version of Win7 and not only with the OEM Toshiba.

    Any suggestions?

    See you soon
    Australia

    > What is it with this? Toshiba has to provide updates and drivers that work with any version of Win7 and not only with the OEM Toshiba.

    Do you think that it is a problem of the tool?
    This seems to work on Toshiba pre-installed OS, so it cannot be a question of tool!

    Maybe a part of the software is missing on the MS Win 7 own

    Have you installed the update of Firmware for 3 G Module?
    This Firmware update is necessary to obtain more stability in your 3 G connection with your Ericsson 3 G module.

    Have you installed the registry patches that are available on the page of the Toshiba driver?
    Do this!

    Good luck

  • TableLayoutManager doesn´t focus in the Manager with two focusable elements

    Hello

    I m using TableLayoutManager in my project. It is an example of my problem:

    I have this code:

    public MyScreen() {
            setTitle("TableLayoutManager_Example");
    
            VerticalFieldManager vfm0 = new VerticalFieldManager();
            vfm0.setBorder(BorderFactory.createSimpleBorder(new XYEdges(10, 10, 10, 10), Border.STYLE_TRANSPARENT));
            VerticalFieldManager vfm = new VerticalFieldManager();
            vfm.setBorder(BorderFactory.createRoundedBorder(new XYEdges(5, 5, 5, 5)));
    
            TableLayoutManager table = new TableLayoutManager(new int[] { TableLayoutManager.USE_PREFERRED_SIZE,
                    TableLayoutManager.SPLIT_REMAINING_WIDTH, }, null, 0, Manager.NO_HORIZONTAL_SCROLL
                    | Manager.NO_VERTICAL_SCROLL);
    
            LabelField lb=new LabelField("Label1    ");
            HorizontalFieldManager hfm=new HorizontalFieldManager();
            TextField tf=new TextField();
            LabelField lb2=new LabelField("Label2",Field.FOCUSABLE);
            tf.setText("Text");
            tf.setMaxSize(5);
    
            hfm.add(lb2);
            hfm.add(tf);
    
            LabelField lb3=new LabelField("Label3");
            LabelField lb4=new LabelField("Label4",Field.FOCUSABLE);
    
            table.add(lb);
            table.add(hfm);
            table.add(new SeparatorField());
            table.add(new SeparatorField());
            table.add(lb3);
            table.add(lb4);
    
            vfm.add(table);
            vfm0.add(vfm);
            add(vfm0);
    }
    

    The problem is that I have can´t emphasis in the TextField. If I just add lb and hfm components to the table, it works, but if I add other components focuss (as example) I can´t focus in the TextField, the emphasis in Label4:

    What can I do?

    Thank you.

    I ve found a good solution. I ve replaced the TableLayoutManager navigationMovement method. This is the code:

    /**
         * Navigation movement to allow for both cell to cell within a columns and row movement
         */
        protected boolean navigationMovement(int dx, int dy, int status, int time) {
            int focusIndex = getFieldWithFocusIndex();
            int dirY = (dy > 0) ? 1 : -1;
            int absY = Math.abs(dy);
    
            for (int y = 0; y < absY; y++) {
                focusIndex += _columns * dirY;
                if (focusIndex < 0 || focusIndex >= getFieldCount()) {
                    //#ifdef BlackBerrySDK4.5.0
                    this.invalidate(); //ref #217
                    //#endif
                    return false;
                } else {
                    Field f = getField(focusIndex);
                    if (f.isFocusable()) {
                        f.setFocus();
                    } else
                        y--; // do it over again
                }
            }
    
            int dirX = (dx > 0) ? 1 : -1;
            int absX = Math.abs(dx);
            for (int x = 0; x < absX; x++) {
                focusIndex += dirX;
                if (focusIndex < 0 || focusIndex >= getFieldCount()) {
                    //#ifdef BlackBerrySDK4.5.0
                    this.invalidate(); //Ref #217
                    //#endif
                    return false;
                } else {
                    Field f = getField(focusIndex);
                    if (f.isFocusable()) {////////////////////////NEW CODE /////////////////////////////////////                    if(f instanceof Manager){
                            int fieldsInManager=((Manager)f).getFieldCount();
                            if(fieldsInManager>0){
                                for(int i=0;i
    

    I'm looking for a manager within the cell. If I found it, I put emphasis in its elements. It works with a Manager with one or more of the focus object elements.

    If you see it is good, you can add this code to your original code

    Thank you.

  • Shifts the Focus to the Manager.

    I'm a manager of vertical field with 2 horizontal field managers. Each HFM contains two different fields. Its luks like that.

    HFM 1

    V   |------------------------------

    |   FIELD1 | FIELD2 |

    F   |------------------------------

    |------------------------------

    M |   FIELD3. FIELD4.

    |------------------------------

    HFM 2

    I need it

    1. On the focus of Field1, sink the emphasis should be on field3
    2. Field of development 1, press right emphasis sholud be on field 2
    3. PN depose2 emphasis, left press move focus in field 1, press down shift to field3
    4. Focus on field 3, when to press high, ficus should be on field 1 (not the Field2. "Now it comes like that).
    5. On focus Field3, press right goto field4.

    I tried several ways to do so. But I'm ot get a correct output.

    Hi all

    I have corrected the problem. I have replace the movefocus method in the hfm and pressing upwards or downwards, I put a value Boolean true. Override the onfocus method, in that if the Boolean value is true, defined as 1 and super.onfocus (branch) call otherwise no need to set the value of the direction.

    Hope it will be useful for all...

  • BlackBerry Smartphones cannot install Blackberry Desktop Manager

    Hello

    I have a problem which, for the last two days, I can't solve.

    I can't install the Blackberry Desktop Manager 7.1 on my Ultimate de Windows 7 64 bit laptop.

    During the last moments of the installation, I get this message:

    "Error 1935 Assembly component {9BAE13A2-E7AF-D6C3-A01F-C8B3B9A1E18E} hresult 0x800736b3".

    Installation cannot continue. »

    It then restores the entire system...

    I cleaned my registry using CCleaner, optimizer Reg and TuneUp Utilities, uninstalled all the Visual C++ redistrib. uninstall the .NET Framework 4.5, uninstalled the MSXML 4.0 SP3, rebooted and reinstalled it preceding.

    Fsutil resource setautoreset true c:\ tried and in cd\windows\temp del *.tmp invites; has run as an administrator.

    I disabled my Mcafee AntiVirus Plus, Malwarebytes and TuneUp Utilities...

    Nothing works...

    HELP PLEASE!

    Thanks to everyone who helped... Problem solved after installing direct x on top of all other software...

  • Group administrator cannot open Control Panel, Manager of tasks or access networked readers

    Hello

    I have a little trouble getting one of our computers in the domain to cooperate.  We've added a bunch of user profiles of domain on this computer, all under the administrator group, but nobody except the local administrator can access network drives, open Control Panel and open the Task Manager.  Even our domain administrator cannot do the previously listed.  We have 3 other computers that use all the same members, and they are all very well, so I don't think that the question lies in group policy.  It's almost as if the local administrator group settings have been changed somehow?  I went into the local group policy and all settings seem correct.  I'm puzzled little at this stage.  This could be the cause of this problem?  What is a corrupt local administrator account?  For any help or suggestion would be greatly appreciated!
    Thank you!

    Hi Jay,.

    Thanks for posting your query in Microsoft Community.

    The question you have posted is linked to the domain. It's going to be better suited than it pro. I suggest you post in the TechNet Forums.
    http://social.technet.Microsoft.com/forums/en/w7itpronetworking/threads

    I hope this helps!

  • Cannot install Adobe Application Manager

    Hello

    I just got access CC and try to install InDesign on my computer, but I get an error of installation Adobe Application Manager:

    adobe.jpg

    Message is in German and means "Cannot install the Adobe Application Manager" - no code error more or something else.

    Any ideas what to do? The log files, I can look at?

    Thank you

    Klaus

    Please visit: http://forums.adobe.com/message/5428322

  • Cannot start Adobe Application Manager

    I can't open the Adobe Application Manager. I tried to run setup.exe in the Adobe Application Manager 7.0 folder I downloaded. It is said that it will update the first time. After the first time I ran it, Adobe Application Manager is not yet "in my program list. Then, if I try to run again, I get an error. I tried tuning Adobe Support Advisor, but he tells me that it cannot find the questions. So, I can't run my Adobe application manager and I need to get my InDesign to the new version that uses the rest of society!  Windows 7, Adobe Creative Cloud

    Help!

    Justin MacCreery

    < deleted by the moderator >

    Hello

    Please follow these steps to solve the problem.

    Download and run Creative Cloud installer from this location.

    http://www.Adobe.com/support/contact/cscleanertool.html

    Once please download Creative Cloud Desktop Apps from this location.

    http://www.creative.Adobe.com

    After the creation of the clouds is installed, then you can download and install Indesign CC.

    Please let me know if it helps.

    Kind regards

    Abhijit

  • Cannot install desktop applications Manager

    adobe Application Manager, I downloaded on my desk and still get cannot load the message... go 3/4 thanks to the installation and ask permission to continue, then I give permission and then goes a bit further in the installation, and then closes and says installation failed... help... downloading CC for photoshop using windows 7

    Hello

    To continue the installation of Photoshop CC, please follow the procedure below:

    1. go to \Program Files (x 86) \Common Files\Adobe\OOBE, now inside to rename folder OOBE folder 'PDApp' to something like '-PDApp.

    2. restart your browser and go to https://creative.adobe.com/products/

    3. sign in with your adobe ID and download creative cloud

    4. run CreativeCloud.exe

    You would be able to download Photoshop Apps Panel of creative cloud CC

    Thank you

    Lou

  • You cannot add a download manager like idm in firefox?

    If you can, why not you? You can do an open source Manager to download as open source browser and it shipped with Firefox. Am I wrong?

    Hello

    I had a peek in on the Firefox Add-ons site download managers and we found quite a few extensions that might help.

    Firefox already contains some download management options and these extensions (whether on their own or with others) will expand to this.

    I hope this helps, but if you have any other questions please request and we will do our best to help.

  • Cannot focus Skype name and password in the login screen

    I use Skype for a long time now and used the automatic connection whenever I start my computer. Today, I accidentally disconnected from Skype. Now, I can focus my Skype name and password in the login screen. I'm having the same problem with fields in Internet Explorer 11. Does anyone know a solution to this problem? I use Windows 7 Professional.

    For me, that did the trick.
    http://community.Skype.com/T5/Windows-desktop-client/Skype-won-t-sign-in-can-t-enter-password/m-p/41...

Maybe you are looking for

  • Apps quit properly or to force out

    I had a strange problem on my macbook pro (el capitan 10.11.5, processor 2.5 GHz, 16 GB of memory, everything is completely up-to-date) where certain apps quit properly? as I press "quit" and everything will act as it's quit smoking and application d

  • Try to reformat

    Hi, I have a laptop HP Pavilion series g6... I tried to reformat without using a cd that follows this video https://www.youtube.com/watch?v=GW2hPNZ3PrA but unfortunately used to restore factory back up even 1%... so I restarted my laptop and press f1

  • Searching for files and rename the file

    In my C:\, I have a number of files, namely C:\myfolder1, C:\myfolder2, C:\myfolder3... and in each folder, I have several text file *.txt. I want to have a code that go all C:\myfolder* and rename the text in file bin, for example. ABC.txt to the ab

  • How can I make visible missing shelves again?

    I need urgent help! A few days ago all the standard shelves in ADE 4.5.1 (windows PC 10) disappeared from the surface, no books are in my library, when I try to drag and drop my books purchased, ADE told me that they are in the library, but I can't f

  • Is it possible to use After Effects to edit a video of the iPhone?

    I start a YouTube channel and I don't have enough money to buy a big HD video camera, and I don't know if I can edit videos to iPhone using After Effects.