EditField - cursor stuck in the field

Hello

I have an EditField which changes color on onFocus and onUnfocus.  What is strange, is that the slider 'stuck' in the EditField whenever I move (using the trackball) in the field.  I am not able to move out of the EditField until I hit the ESC key.

Anyone know why this is the case?

I don't think that it has nothing to do with the definition of the properties available to the field, as all my EditFields behave this way when their "onFocus" and "onUnfocus" attributes are defined.

(Code pasted below)

EditField searchtextbox = new EditField(Field.FIELD_VCENTER) {
    public void layout(int width, int height) {
            super.layout(width, height);
            setExtent(250, 25);
            }

    public void onFocus(int direction) {
            Background activebgclr = BackgroundFactory
                .createSolidBackground(Color.WHITE);
            setBackground(activebgclr);
            invalidate();
            select(true);
            }

    public void onUnfocus() {
            super.onUnfocus();
            Background inactivebgclr = BackgroundFactory
                    .createSolidBackground(Color.GRAY);
            setBackground(inactivebgclr);
            invalidate();
            }
};

When the focus is passed to the EditField, you use

Select (true);

This puts the ground in "selection mode, more usually used to select pieces of etxt for operations of cut and paste or copy.

Delete this line and I think that things will work as expected.

Tags: BlackBerry Developers

Similar Questions

  • Cursor stuck in the center of the screen

    All of a sudden the cursor on my son's pc is stuck in the middle of the screen.  It's a mouse optical usb.  I checked that the mouse (3 different ones) works on other computers in the House.  I tried to move the mouse to different ports, but the cursor remains blocked.  I rebooted the computer several times, both with the wired mouse and without the mouse, in him after reconnecting.  When I go to Device Manager (navagating around using the keyboard... fun, not!) there is no category for mice and other pointing devices, do not know if this is relevant or not.  This computer runs on Windows XP.  I would be grateful for any suggestion, at this point, I feel I have ruled out problems with ports and mouse/mice, do not know where to look.

    So, you have a USB keyboard or a PS/2 keyboard?

    What is the brand and model of your mouse?

    You may also download USBDevView from http://www.nirsoft.net/utils/usb_devices_view.html and see if it can detect the presence of your mouse in the registry.

    Hi PML... I appreciate your help.

    It is a usb mouse.  I have access to 3 all seem to run on other computers.  So I'm trying to use the computer problem is an optical mouse, Kensington, model K64381.  OK, so I downloaded the driverboost... and I'm ready to scan, but even if I am using the tab key, I can't land on the button 'Search now' huge... it never stops down on the link 'leave driverboost'... any suggestions.

    I meant the keyboard , not the mouse.  If you have a PS/2 keyboard, then you can safely uninstall all the USB root and hubs controllers (working from the bottom up) in Device Manager.  When you restart, Windows should detect the hardware and reinstall everything.  It may - or may not - the problem of your system, not recognizing the mouse when it is connected.

    The problem if you have a USB keyboard is that you then will be temporarily withoutANY interface to the computer... and IIRC, you must meet certain dialogs during the phases of detection.  If you can't answer (because you do not have a mouse or a keyboard), nothing is reinstalled.

    Even if you do not have a PS/2 keyboard, before uninstalling the hubs and USB controllers, you can search the devices 'ghosts' that can possibly cause a conflict that prevents your system by recognizing the mouse.  The directions are here:http://support.microsoft.com/kb/315539 replace step 1 with the following, which does not use the mouse:

    Windows key + R > cmd > Enter

    I'm not sure what you mean regarding the "Driverboost."  I wanted to say to you allows you to download a utility named 'usbdeview.  Direct download (for a zip file) link ishttp://www.nirsoft.net/utils/usbdeview.zip if you are able to unzip the file, you must then just run usbdeview.exe and he should do the scan automatically.  There is no button "scan now".

    USBDeview.exe should do the research work in the registry automatically.  If you want to consult the registry yourself, start by running regedit and navigate to

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Enum

    Should a subkey under Enum named HID, and a named another USB.  If you develop any of these two subkeys (based on your device manager, you can miss the subkey HID completely), you should see a number of entries that begin with the characters Vid.  Here is the 'provider identification' for different devices connected to your computer.

    The VID of Kensington is D 047, then look for an entry or entries that look like this: "Vid_047D & Pid_xxxx" (the xxxx is the "product identification code"; I believe that the value of PID for your mouse 1067, but I could be wrong).

    If you click on the subkey under the Vid for Kensington, you 'should' see details of your mouse.  It should look like this (although it is a Logitech mouse):http://cid-18b259158254905b.office.live.com/self.aspx/.Public/mouse%20reg%20key.jpg

  • Offset from cursor position to the fields (in an iFrame) only on the Apple iPad

    Hello, I made an animation that once completed, it displays an iFrame that has a few fields.  The entry fields have very well on a laptop pc or mac computer, but when I use an Apple iPad, the positions of the cursor are far outside the fields as I type.

    Here is the Web site page: http://pbpromos.com/ipad-input-fields-error/

    Here I have the same iframe, one inside the border and the other outside edge.  Both work fine on a pc or a mac, but if you try to use an Ipad, you'll see that edge, we show the cursor in the input field down and outside the box.

    You can see for yourself, I put it to you to test and see this error.

    The animate oam file is: https://www.dropbox.com/s/hvydp2x61f6aq13/test-ipad-input-fields.oam

    Here is a link to the files of edge, the .a and java files:

    https://www.dropbox.com/sh/5ljxhc81gu97bcn/zphJ6pMc2J

    Very much appreciate everything you can do on this!

    Appreciate greatly all what you can do for me, because I'm pretty desperate for a solution or a workaround.

    Gotcha - have - try you with sensitive scaling disabled? After looking at this seems to be the culprit. Worth a try to isolate the problem.

    Sarah

  • Text of the form only appears when the cursor is in the field

    I created a form and sometimes, when it is filled and returned to me, empty fields. If I place my cursor in the field, see text responses.  What can I do to fix this?

    It is a question of the user.  This happens usually when someone is using one program other than Adobe Reader or Acrobat to fill in the form, such as Mac preview.  You can simply put a text box on the form asking the user to download and fill out using Adobe Reader with a link to the Web site OR if you do not receive a form in this way you can "show" the fields by following these steps.  (Assuming you have at least Adobe Acrobat Standard):

    Form open with hidden data.

    Go to the forms > manage form data > export data

    Save the file as XDP.  Close the form.

    Reopen and go to:

    Forms > manage form data > import data

    -import the XDP file, you just created.

    Should now show all your fields.  Saves time when you have a prepared form.  Keep in mind that some of your data have no AutoFormat as the user has not used Adobe to complete the form and some fields may require 'clearing '.

    Brenda

  • Cursor move to the field next when you press enter/return

    Is there a way to make the curson go to the next field when you click Enter / return as it does when you press the tab key? Currently he entered just the info in the current field and does not advance to the next field with I button back.

    You can with JavaScript, but you have to use in the event of strike or Format a field, which is (normally) not available for all types of fields (checkboxes, for example). For text fields, you can use the following in the Format event JavaScript code:

    Fragment of script format for the text field

    If (event.commitKey = 2) {}

    getField("Text2").setFocus ();

    }

    Replace "Text2" with the name of the field you want to access the next.

    The problem with this approach is the Format or the key event isn't available for the fields for which you have selected one of the pre-defined formats types (for example, number). There are ways to work around this limitation, if necessary, but things get a little complicated.

  • Form data not shown unless the cursor in the field

    .PDF with the form filled in will not display or print form data when open with Windows and Reader 8.1.

    Display and print are OK on Mac OS X with Reader or preview.

    other files created and downloaded from the web site even did not have this problem.

    File transferred as a piece attached and copied by react "sneaker net" the same on several PC.

    move the cursor to any field filled shows data only when the cursor is in the field.

    Opening a PDF form in preview it corrupts and causes the behaivour you describe. You can correct the form using this tool:

    http://blog.practicalpdf.com/2013/08/introducing-the-practicalpdf-fix-form-utility/

    In the future, avoid using Preview if it is possible.

  • How to discover the field that has been activated in a time-new-record-instance

    Suppose that: a block several record. The user is positioned on a record existing on the land has

    Action: the user clicks on blank (new) record field B

    Question: How can I discoverer was clicked on field B in the times-news-record-instance? Already tried: system.current_item and: system.trigger_item. They both contain "field.

    Published by: user473811 on August 26, 2010 04:56

    Hello

    For the new record of recording/empty if the user tries to access any field, then cursor won't allow access this field. It will go to the first field in this block navigation or you use any variable as trigger_item/current_item system, etc. You can test when you click on any field cursor will go with force to the first field of navigation of this block. So in the case you always it will return A FIELD, which is correct. If the cursor remains on the field, then it will return this the name field that you can test for all previous records by accessing any field at random.

    -Clément

  • When I opened a new tab, the cursor is automatically in the field of navigation, because I reinstalled Firefox yesterday. Is there a solution?

    When I opened a new tab, the cursor is automatically in the field of navigation, because I reinstalled Firefox yesterday. Is there a solution?

    I solved.

    I installed mutorrent, which in turn installed 'Safe Protect' of 'Intermediary' that messed up my Internet browser settings.

    I uninstalled it and everything turned back to normal, when I opened a new tab, the cursor is automatically in the address bar (ie. it is highlighted).

    Thanks for your time.

  • My iMac cursor is stuck in the upper left corner of the login screen and I can't move it and now I can't use my iMac. What can I do? My iMac is a 27-inch 2014 release (one thin without retina display) and uses the keyboard and wireless mouse.

    My iMac cursor is stuck in the upper left corner of the login screen and I can't move it and now I can't use my iMac. What can I do? My iMac is a 27-inch 2014 release (one thin without retina display) and uses the keyboard and wireless mouse. It runs OSX Mountain Lion (not sure which version) and is a model 27 inches.

    have you tried to change the batteries in the mouse?

  • HP pavilion g6 stuck on the black screen with cursor 8 windows

    Hello.

    I used windows 8 perfectly... but today when I rebooted my laptop I don't have the 'Press esc to access the configuration menu"and once loaded in the windows icon. It got stuck on the black screen...

    Any ideas or suggestions? How can we get? Icannot go to the start menu cannot load the... Task Manager what can I do? Also the battery also affects bones

    "It was a moment cartoonic, when gravity stops for coyote to make him realize that he was wrong from the beginning."

    Hi, I did a hard job looking for a solution, and after a while, I found a solution. The solution to the problem was a little easy, but at the same time a bit funny too, hehehe.

    The solution was, when I removed the battery, then did what you told me, I even! Even the black of the same screen cursor. Then I tried power the computer nothing do but simply by pressing the power button without the battery in it. The laptop ran using cable ca, and then I was able to use the windows. Its perfect work. Now I have piles in too and its still in good condition.

    Now what do me? Should I replace the battery, I get error 601 (main battery) too. So should I replace it with a new one? I hope that it will be more preferable.

  • Change the field. The cursor position

    Hi all.

    I've customized EditField with measure 300 x 100. Cursor appears in the upper-left after the inserted text.

    How can I configure the position there of the cursor so that it is located in the Middle?

    d1Vitaliy, Peter says - substitute onFocus in your area and call setCursorPosition (getText.length ()) in there (if you want to have the cursor at the end of the text).

  • the mouse cursor suddenly began to be stuck at the edge of the top or bottom of the screen.

    using Win 7 and all of a sudden today the mouse cursor would not and was stuck at the bottom or top of my edge of the screen.  I tried several different mice, both wireless and wired without result.  I rebooted several times and made a thinking system restore date was also a problem. I looked everywhere for a solution and can not find a.  I don't think it is specific drive due to different types of mouse, I've tried.

    Help!

    Hi RussCFP,
     
    1. have you installed the latest drivers for the mouse on your computer?
    2 did you check for any yellow exclamation point in Device Manager?
    3. other USB devices work properly?

    Method 1:

    I suggest to start in safe mode and check that the device.
    Method 2:

    Try to run the troubleshooter and check.

    Open the hardware and devices Troubleshooter
    http://Windows.Microsoft.com/en-us/Windows7/open-the-hardware-and-devices-Troubleshooter

     
    Method 3:
    Try to uninstall and reinstall the drivers for the mouse on your computer, to do that follow the steps below.
     
    a. Click Start and then click Control Panel.
    b. double-click System.
    c. click on the Hardware tab.
    d. click on Device Manager.
    e. expand mice and other pointing devices.
    f. right click on the device IntelliMouse that you want to delete and then click on uninstall.
    When the confirmation message appears, click Yes.
    Note Your mouse does not work at this stage.
    g. restart the computer.
     
    When your computer restarts, Microsoft Windows automatically detects the hardware change.
    Install the mouse driver and check its operation.
     
    Contact your hardware manufacturer for the latest drivers for your mouse.

    Thank you, and in what concerns:
    I. Suuresh Kumar - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • I work with dreamweaver cs6 running on Apple Mavericks.  The site definition window shows all different fields by opening. I have to click blind with the mouse cursor in this window until the fields appear.  It is a very bored

    I work with dreamweaver cs6 running on Apple Mavericks.

    The site definition window shows all different fields by opening. I have to click blind with the mouse cursor in this window until the fields appear.

    It is somehow very annoying to complete the connection to the server and all the other things.

    Is there a solution?

    If this is the case, I think that it is perhaps a good idea to uninstall Dreamweaver. Before you reinstall, make sure that your personal configuration file has been deleted (see reinstalling Dreamweaver (or the extensions Manager) fails to solve problems). You should then have a completely clean copy of Dreamweaver has again the default settings of the program.

  • Hello, the resque cursor stuck on video but the film continues to advance all the same. Thank you

    Excuse me, but I do not speak English.

    I have a problem with the cursor. The latter gets stuck on the video but the film continue to move forward. What do I do?

    Thank you everyone

    David

    Thanks for the reply and glad to hear that everything is going well at the moment.

    If the question comes up, we can look at the issue more in detail, including if the problem is just in a

    project or overall.

    Best wishes

    RTA

  • Name of the field that passes to a cursor

    I would like the name of a field in the WHERE clause, in a cursor. In my application, I need to change the domain name to find out where the clause. I get an "Invalid number" error when I try the following:

    cursor l_sel2Cur (c_group varchar2)
    is
    Select email from test_grp_tbl6 where c_group = 1;

    ....

    Select column_name
    in l_colName
    of listserv_grp_lk
    where lg_id = v_listserv_grp;

    ................

    Open l_sel2Cur (l_colName);

    I hope that's enough explanation. I've seen examples where the value for the where clause is, but not where the name of the field itself. Is this possible?

    Thanks in advance,
    John

    See the following example:

    SQL> create or replace procedure print_enames(in_col in varchar, in_val in varchar2) is
      2  c sys_refcursor;
      3  v_name emp.ename%type;
      4  begin
      5    open c for 'select ename from emp where '||in_col||'='''||in_val||'''';
      6    loop
      7     fetch c into v_name;
      8     exit when c%notfound;
      9     dbms_output.put_line('ename='||v_name);
     10    end loop;
     11  end;
     12  /
    
    Procedure created.
    
    SQL> select * from emp;
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
    
    14 rows selected.
    
    SQL> set serverout on
    SQL> exec print_enames('mgr','7839')
    ename=JONES
    ename=BLAKE
    ename=CLARK
    
    PL/SQL procedure successfully completed.
    
    SQL> exec print_enames('sal','1250')
    ename=WARD
    ename=MARTIN
    
    PL/SQL procedure successfully completed.
    
    SQL> exec print_enames('deptno','30')
    ename=ALLEN
    ename=WARD
    ename=MARTIN
    ename=BLAKE
    ename=TURNER
    ename=JAMES
    
    PL/SQL procedure successfully completed.
    

Maybe you are looking for

  • My internet speed is good, but the download of firefox is very slow. Why?

    I have a WiFi internet connection shared with 54.0 Mbps speed. Internet high speed is good, but the installer of Firefox download Firefox at very slow speed. It takes about 10 to 15 minutes in the Firefox download. Please correct the problem if it oc

  • 10.11.5 update can not be installed

    iMac late 2013 After you download the update from the App store, nothing else is happening. The update operation does not start.  It's that I didn't do anything. What's wrong?

  • HP Pavilion p7-1443 and Windows 7

    Hello I just bought the HP Pavilion p7-1443 with Windows 8.  I was wondering if it is possible to replace Windows 8 with Windows 7 on this computer.  Has anyone tried this before? Thank you Serrano

  • Satellite L10 - problems with my Wi - Fi button

    Hi guys. I'm new to this forum so please be gentle with me. My Satellite L10 cut last week and I have problems getting the wireless on again.I was on the button since but without success. Everyone knows that before and someone has suggestions or cons

  • How to find drivers for an old PC.

    I found an old pc with windows 2000 or me and I don't know its manufacturer, I would like to upgrade to windows xp, where I can find the generic drivers or something like that?