How do I not selectable Listfield?

Hello

I have a listfield. In one case (when the user chooses an option button 2), I don't want this list to be selected by the user. So I want to remove the selection on this listfield in selection of radio button 2. I'm trying to solve this problem under fieldChanged with the following code:

_lst.setEmptyString("",0);
_lst.setSize(0);
_lst.select(false);
_lst.selectionDelete();
_lst.setEditable(false);
_lst.setSelectedIndex(-1);

But it does not work as my expectation. With this code, I do not see the content of the list as expected, but able to select a line, which is of first rank, which is empty. I want to do the entire list to be unselectable.

Please sugegst me how can I solve this problem?

Thank you.

FieldChangeListener and your custom ListField are completely independent. When you create your ListField, override its method of isFocusable() to take into account a flag value in turn depending on your state of the checkbox. This dependence can be established by setting FieldChangeListener on your field check box.

Read the docs on the field. isFocusable () and it will become apparent.

Tags: BlackBerry Developers

Similar Questions

  • How to get the element selected listfield and goto next page?

    Assalaamualikum

    I try parsing the XML from a url and show in listfield.

    problem:

    How to get the selected item and passing the variable and than goto next page?

    my code:

    package parsepack;

    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Vector;

    Import javax.microedition.io.Connector;
    Import javax.microedition.io.StreamConnection;

    Import net.rim.device.api.system.Bitmap;
    Import net.rim.device.api.system.Display;
    Import net.rim.device.api.ui.DrawStyle;
    Import net.rim.device.api.ui.Field;
    Import net.rim.device.api.ui.FieldChangeListener;
    Import net.rim.device.api.ui.Graphics;
    Import net.rim.device.api.ui.Manager;
    Import net.rim.device.api.ui.UiApplication;
    Import net.rim.device.api.ui.component.ListField;
    Import net.rim.device.api.ui.component.ListFieldCallback;
    Import net.rim.device.api.ui.container.MainScreen;
    Import net.rim.device.api.ui.container.VerticalFieldManager;
    Import net.rim.device.api.xml.parsers.DocumentBuilder;
    Import net.rim.device.api.xml.parsers.DocumentBuilderFactory;

    to import org.W3C.DOM.document;
    Import org.w3c.dom.Node;
    Import org.w3c.dom.NodeList;

    extends xmlparsing public class UiApplication implements ListFieldCallback, FieldChangeListener
    {

    Public Shared Sub main (String [] args)
    {
    xmlparsing app = new xmlparsing();
    app.enterEventDispatcher ();
    }

    public long mycolor;
    Connection _connectionthread;
    private static ListField _list;
    private static Vector listElements is new Vector();.
    public display display = new MainScreen();
    MainManager VerticalFieldManager;
    VerticalFieldManager subManager;

    public xmlparsing()
    {
    Super();
    pushScreen (screen);

    final Bitmap Imagearriereplan = Bitmap.getBitmapResource ("blackbackground.png");

    mainManager = new VerticalFieldManager(Manager.NO_VERTICAL_SCROLL |) Manager.NO_VERTICAL_SCROLLBAR)
    {

    public void paint (Graphics graphics)
    {
    graphics.drawBitmap (0, 0, Display.getWidth (), Display.getHeight (), Imagearriereplan, 0, 0);

    Super.Paint (Graphics);
    }

    };

    subManager = new VerticalFieldManager(Manager.VERTICAL_SCROLL |) Manager.VERTICAL_SCROLLBAR)
    {
    protected void sublayout (int maxWidth, maxHeight int)
    {
    int displayWidth = Display.getWidth ();
    int displayHeight = Display.getHeight ();

    Super.sublayout (displayWidth, displayHeight);
    setExtent (displayWidth, displayHeight);
    }
    };

    Screen.Add (mainManager);

    _list = new ListField()

    {

    public void paint (Graphics graphics)

    {
    graphics.setColor ((int) mycolor);
    Super.Paint (Graphics);

    }

    };
    myColor = 0x00FFFFFF;
    _list. Invalidate();
    _list.setEmptyString ("* only supplies not available *", DrawStyle.HCENTER "");
    _list.setRowHeight (50);
    _list.setCallback (this);
    mainManager.add (subManager);
    listElements.removeAllElements ();
    _connectionthread = New Connection();
    _connectionthread. Start();
    }

    protected boolean navigationClick (int status, int time)
    {
    Try
    {
    Here, go to another screen if you need.

    }
    catch (System.Exception e)
    {
    System.out.println ("Exception:-: navigationClick()" + try ());
    }
    Returns true;
    }

    private class login extends thread
    {
    Public connection()
    {
    Super();
    }

    public void run() {}
    Doc document;
    StreamConnection conn = null;
    InputStream is = null;
    try {}

    Conn = Connector.open (StreamConnection) ("http://ec2-54-248-241-248.ap-northeast-1.compute.amazonaws.com/koperasi-akr-trial/cgi-bin/gw-pinjama...

    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance ();
    docBuilderFactory.setIgnoringElementContentWhitespace (true);
    docBuilderFactory.setCoalescing (true);
    DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder ();
    docBuilder.isValidating ();
    is = conn.openInputStream ();
    doc = docBuilder.parse (is);
    doc.getDocumentElement () .normalize ();
    List of NodeList = doc.getElementsByTagName ("ID");
    for (int i = 0; i)< list.getlength();="" i++)="">
    Node node = list.item (i) .getFirstChild ();
    listElements.addElement (textNode.getNodeValue ());
    }
    } catch (Exception e) {}
    System.out.println (try ());
    } {Finally
    If (is! = null) {}
    try {is.close ();
    } catch (IOException ignored) {}
    } If (conn! = null) {}
    Try {conn.close () ;}
    catch (IOException ignored) {}
    }} UiApplication.getUiApplication () .invokeLater (new Runnable() {}
    public void run() {}
    _list. SetSize (listElements.Size ());
    subManager.add (_list);
    Screen.Invalidate ();
    }
    });
    }

    }

    ' public void drawListRow (list ListField, Graphics g, int index, int y, int w)
    {
    Your string = (String) listElements.elementAt (index);
    int yPos = 0 + y;
    g.drawLine (0, yPos, w, yPos);
    g.drawText (, 5, 15 + y, 0, w);
    }

    public {get {Object (ListField list, int index)
    {
    Return listElements.elementAt (index);
    }
    public int indexOfList (String prefix, ListField list, int, string)
    {
    Return listElements.indexOf (prefix, string);
    }
    public int getPreferredWidth (ListField list)
    {
    Return Display.getWidth ();
    }
    public final void insert (String toInsert, int index) {}
    listElements.addElement (toInsert);
    }

    ' Public Sub fieldChanged (field field, int context) {}

    }
    }

    Thank you.

    I told you that replace the navigationclick() method where initialize you your listfield

    as I think that changing your code and then answer me

    _list = new ListField()
    {
    protected boolean navigationClick(int status, int time)
    {
      Dialog.inform("hi");
      return true;
    }
    
    public void paint(Graphics graphics)
    {
    graphics.setColor((int) mycolor);
    super.paint(graphics);
    }
    };
    
  • How to print a selection of an image in photoshop CC, I have problems because in the print window does not display the full image and the printed only a section of what I SELECTED

    How to print a selection of an image in photoshop CC, I have problems because in the print window does not display the full image and the printed only a section of what I SELECTED

    Hi jodepepevalentin,

    In the print menu, check "scale to fit media" under the Position and size of the device and then check out.

    If you want the area selected for printing, check "Print selected area" under the Position and size and specify the size.

    Kind regards

    Claes

  • When I opened a new tab navigation bar is not selected. How can I fix?

    I looked at other issues, but I couldn't find a solution for this. When I opened a new tab, the navigation/URL bar is not selected, and I can't just type to search or enter a URL. I have to move my mouse and select it. This is quite annoying because I use Firefox for years and he was always selected by default. Also, I have problems with my default browser. It seems to have opted for Google, Yahoo, and I could not change it back. (I'll post another question for this shortly after searching the answer more).

    Thanks for the help in advance.

    Hello
    You can check if this problem appears when you start firefox in safe mode, questions to troubleshoot Firefox in Safe Mode if everything works properly in safe mode which means that the problem occurred due to some extensions or themes.
    You can try to reset Firefox Firefox Refresh - reset the settings and Add-ons but be sure to reset firefox will remove your extensions and themes, preferences of site specific, search engines, download history, DOM Storage, security settings, download actions, configuration of the plugin, toolbar customizations, user and social features styles

  • How can I stop the transfer of emails for those who are not selected

    I don't know if my hotmail works properly... cause it sends e-mails to people who are not selected for?

    Mary

    Hello

    As you use Hotmail and Hotmail-related question you have posted. I suggest that you post you query on the Hotmail forum for assistance:

    http://windowslivehelp.com/product.aspx?ProductID=1

  • How to change the selectable languages for spell checking?

    Hallo community Mozzila

    After using Firefox to group every night 23 on Chakra Linux via and I think it has messed up my settings speller via Firefox sync.

    The problem of the pop-up on openSUSE and Chakra Linux but not in Kubuntu 12.04 (it has its own language packs).
    I want to have German and English GB and maybe Bosnian or Croatian spell checker, but I cannot select via right click - languages.
    Now, I have Chakra Linux and openSUSE 12.3 Firefox 20 by perhaps 30 default languages installed but I can not select the language I want.

    For example the Chakra Linux Firefox 20 I only selectable variants, German back Germans, German Belgium... and then, and I can't select another language via the module or about: config spellchecker.dictionary; so I need to edit the right click language selector to bring it to work, it stay alwas on a German Variant.

    2 example on openSUSE cannot select German and En_GB, but I can't select a bunch of other languages, that I did not need in the click languages Selector right.

    Both are Firefox 20 with openSUSE KDE changes and have installed the available spelling dictionary.

    So, how can I change the list of selectable languages on the languages right click?

    OK, this is now resolved.

    In Chakra hunspell English was missing and on openSUSE, a seller has changed of Mozilla and now it works very well.

    Sorry to the comminty boreder

  • Not selectable in LabVIEW DAQ card

    I installed a PXI-6122 card. The device is listed as "Device is working properly" Max:

    Now, I want to select the device to a constant of the device in LabVIEW 2010, but is not listed there:

    I guess it has to do with how MAX recognizes the PXI card, see previous announcement.

    Does anyone have an idea how I could make this card works and selectable in LV?

    The problem has been resolved by the NI DAQmx developers:

    http://forums.NI.com/T5/Multifunction-DAQ/DAQ-cards-not-selectable-although-listed-in-Max/m-p/124778...

    Thank you very much!

  • How to get the 'selection' illuminated

    I have a vista 64. I had a few printing problem which I found out wasa because google chrom. I had one tech outside and the problem has been corrected. However, I have an impression left of problem that I hope someone can help me with. I'm trying to print part of a page. I am the part children and then go to the print page. However, I cannot print print the part because the only 'all' and 'pages' are turned on. "selection is not lit, so I can't click. Can someone tell me how to recover the 'selection '.

    Hey, Dolores,.

    Your computer is configured to display pages in full screen? When this happens press F11 on your keyboard and see if the button reduce reappears.

  • Windows mail. When sending a new email, I want to use the BCC field, that I can not select because it is not on the new Message. __How make CCB to come when I create a new message? This something __Is I can add tools please?

    Windows mail. When sending a new email, I want to use the BCC field, that I can not select because it is not on the new Message.
    How can I get the future BCC when I create a new message?
    Can I add tools please?

    Thanks for the reply Bruce Hagen. I am very grateful.

    Dave.

    In a new message window: view | All the headers. Check it out. Or, simply click on the button to easily add to your contacts list to: To, CC, or BCC.

    Bruce Hagen ~ MS - MVP [Mail]

  • How can I remove selected Custom view (s) of the event viewer Console tree?

    I looked at the MMC Help on create and manage custom views.

    I can't find a way to remove the custom filter views in the Console tree, which can be found on the left side of the event viewer.

    How can I remove selected Custom view (s) when they serve no more values?

    Problem solved

    I asked this question because I was unable to see what was going on in the event viewer and I couldn't find help in mmc HTML Help. However, now I see what's happening and I can give you a solution to my own question.

    Cause

    If I connect to the computer as a user with administrator privileges, I am able to use the event viewer to create a custom view filter that can be used by all users who have access to the event viewer. If I fix remove a view filter custom Console tree, I can't delete it unless I'm logged in as the user who created it.

    Solution

    1. Log the computer as the user who created the custom view.
    2. Start Event Viewer
    3. Use the right-click of the mouse on a custom view filter selected in the Console tree, open the drop down menu.
    4. Delete appears fourth in the bottom of the menu if and only if you are logged on as the user who created this view.
    5. Select Remove to remove the filter to custom view.

    If Delete does not appear in the drop-down menu, then it may not possible you connect as the user who created the custom view.

  • How to control the selected area in the field

    I'm trying to find how to control him are selected a field so when the field is selected only a part of the field is highlighted. I can't find a way to do this other then stir in a small field within a field not selectable largr.

    Any suggestions on how to do it?

    Thank you!

    Hi crispoyz,

    You can override the drawfocus fields for this method.

    Try with this code. This is an example of code just to understand.

    class CustomField extends Field
        {
            int width = 100;
            int height = 100;
            String _text;
    
            public CustomField(String text)
            {
                super(Field.FOCUSABLE);
                _text = text;
            }
    
            protected void layout(int width, int height) {
                setExtent(getPreferredWidth(), getPreferredHeight());
    
            }
    
            protected void drawFocus(Graphics graphics, boolean on)
            {
                if(on)
                {
                    graphics.setColor(Color.GREEN);
                    graphics.fillRect(20, 10, getPreferredWidth()-50, getPreferredHeight()-30);
                    graphics.setColor(Color.RED);
                    graphics.drawText(_text, (width - getFont().getAdvance(_text))/2,(height - getFont().getHeight())/2);
                }
            }
            protected void paint(Graphics graphics) {
                graphics.setColor(Color.RED);
                graphics.drawRoundRect(0, 0, getPreferredWidth(), getPreferredHeight(), 20, 20);
                graphics.drawText(_text, (width - getFont().getAdvance(_text))/2,(height - getFont().getHeight())/2);
    
            }
    
            public int getPreferredWidth() {
                // TODO Auto-generated method stub
                return width;
            }
            public int getPreferredHeight() {
                // TODO Auto-generated method stub
                return height;
            }
        }
    

    Thank you.

  • How to get the selected row in a programmatic table of the ADF (table generated from a bean)

    Hi all


    We use JDeveloper Studio Edition Version 12.1.3.0.0 and deployed on GlassFish Server Open Source Edition 3.1.2.2 (build 5) and connect to the SQLServer database.


    How to get the selected line in a programmatic (using a SortableModel custom not a display object) ADF table (generated from a bean)?


    We are trying to get the selected row in a bean of a programmatic ADF table to retrieve data based on the selected line.


    Any idea?

    Well, you can use selectionListener to set the selected line to a variable of bean (but this bean must be in extended view or some superiors)

    Something like this: http://www.awasthiashish.com/2015/07/get-selected-row-singlemultiple-from.html

    Dario

  • How the records are selected in the database

    Hello

    How the records are selected in the database


    Thank you.

    Read articles on JDBC, here is what I understand...

    If I set LignesMax = 1 (in out select adapter DB) and I have 30 record in the table that satisfy the select query then what line is picked up? the first in the table or randomly any folder?

    The query returns the first line of the result set.  Not just a random line.  However, to get the rows to return in the result set in a specific order, you must include an order by clause, or the query will return rows in random order.

    And if I set LignesMax = 0 (unbounded, means any number registration) in this case if my select query satisfy 100 million documents so all million records will be picked up once, in one cycle?

    The answer to this depends on the size of the extraction of the query.  If the size of the extraction is > = 100 million, everything goes back in a single cycle of the DB.  If< 100="" million,="" then="" it="" will="" be="" divided="" into="" multiple="" trips="" to="" the="">

  • Question 1: The button "Buy now" does not work when you select a plan. Question 2: Can not select "Monthly Plan" for a "unique App."

    Question 1: The button "Buy now" does not work when you select a plan.

    How to reproduce the problem:

    1. go in terms of pricing and membership creative cloud | Adobe Creative Cloud

    2. choose a plan, then click on 'buy now '.

    3. you go to a blank page instead of the next steps in the payment.

    Question 2: Can not select "Monthly Plan" for a "unique App."

    How to reproduce the problem:

    1. go into "https://creative.adobe.com/plans".

    2. under "Unique App", select a product and then try to select the "monthly Plan" in the second menu drop-down.

    3. for some reason, it isn't get selected and the price is replaced with the ellipsis (...). I expect the monthly price to appear.

    Please notify.

    Thank you.

    Contact adobe during the time pst support by clicking here and, when available, click on "still need help," http://helpx.adobe.com/x-productkb/global/service-ccm.html

  • Some photos are not selected when I try to import ("do not import possible double images" is turned OFF!)

    Some photos are not selected when I try to import. I used Lightroom 5 since it launched and do not have this problem until a month ago (select: "do not import possible double images" is turned OFF!). I really have to control my import in the opposite case, it miss a few images, but don't know what to do when the picture is not selected. How can I import the correctly without making stuff and that's why spoil my archive carefully planned? My archive is too packed and I have double numbers ore something? What I need Lightroom 6?

    Thank you very much for your help!

    Best regards, Enith

    "Photos are indeed grey, but the imported photos are new assignments, so this:" ","then it means that you have previously imported photos in Lightroom, and so it is not necessary to import them again ', is not the case.

    While you are probably right, if the photos were just captured, the problem is that Lightroom think that these are the same pictures that were previously imported, and so until you can determine why Lightroom think that you won't progress.

    You need search for any of these photos in your Lightroom Catalog. Follow these 4 steps in order

    1. In the catalog Panel on the left side of the library Module, click all photographs
    2. Develop all batteries (picture-> stacking-> develop all batteries)
    3. Disable all filters (once or twice Ctrl-L)
    4. Search for one of these photos by file name

Maybe you are looking for

  • Notifications of channel 50

    Often I receive notifications with the title: channel 50 in my alcatel One touch fire.These notifications are not sms or somethig, they appear just even when I'm not connected to a 3g or Wifi network.they display a name of a local carrier, my state o

  • Portege R700-S1321 - cannot set the resolution of 1366 x 768

    I have exactly the same problem, as shown in: http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?threadID=64809 The resolution of the laptop to random times and intervals seems to support a maximum of 1280 x 700, which translates into a 2

  • How to open the port 161 on the ASA and Cisco switches for monitoring of BB

    Dear all, I want to install BB to monitor snmptraps suffering of failure. The newspaper shows BB cannot connect to all ports of the switch 161, and I even can't telnet to 161 XXX_17f for example. My switches are Cisco C3550, C2950, etc. of the ASA. M

  • URGENT winds directed con 'Allerta del sistema' di rosso

    Supporto Gentile, ho di dover interpretare error marked che mi di urgenza compare sul prodotto Poweredge T110 II fuori co. MI venere.com accese spie 1-2 - "Allerta di sistema" rosso. Cerca di partire it someone my if production non permettendomi di f

  • Window sizes host display does not restore after a remote desktop connection

    After that my computer has been accessed via a remote desktop connection, the window size for my program do not restore their previous size.  I have monitors of landscape which are larger than most of the remote users.  When they log off my computer,