Click on the button to see the ListField

Hi all
Please help... I don't know what the problem
I have two problems.
I have the screen where BasicEditField and ButtonField... If I click Show me so ListField.

Here is my source code...

package com.screen;

import java.util.Vector;
import com.stepan.kutaj.bbmsearch.util.CustomListField;
import com.stepan.kutaj.bbmsearch.util.ListRander;
import net.rim.device.api.system.Bitmap;
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.FieldChangeListener;
import net.rim.device.api.ui.MenuItem;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.XYEdges;
import net.rim.device.api.ui.component.BasicEditField;
import net.rim.device.api.ui.component.ButtonField;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.container.HorizontalFieldManager;
import net.rim.device.api.ui.container.MainScreen;
import net.rim.device.api.ui.container.VerticalFieldManager;
import net.rim.device.api.ui.decor.BackgroundFactory;
import net.rim.device.api.ui.decor.BorderFactory;

public class Test extends MainScreen
{
    private BasicEditField enterSearch;
    private ButtonField btnSearch;
    private String txtMenuAbout = "About";
    private Vector info = new Vector();
    private CustomListField myListView;
    private String Name;
    private Bitmap displayPicture = Bitmap.getBitmapResource("rounded.png");;

    public Test()
    {
        super(MainScreen.VERTICAL_SCROLL | MainScreen.VERTICAL_SCROLLBAR);

        addMenuItem(_viewAboutMenu);

        this.getMainManager().setBackground(BackgroundFactory.createSolidBackground(0x00e5e5e5));

        Bitmap borderBitmap = Bitmap.getBitmapResource("rounded.png");

        VerticalFieldManager m = new VerticalFieldManager(MainScreen.NO_VERTICAL_SCROLL);
        m.setBorder(BorderFactory.createBitmapBorder(new XYEdges(12,12,12,12), borderBitmap));

        HorizontalFieldManager h = new HorizontalFieldManager(MainScreen.NO_VERTICAL_SCROLL);

        enterSearch = new BasicEditField("Search : ", "");
        btnSearch = new ButtonField("Search");
        btnSearch.setChangeListener(buttonListener);
        h.add(enterSearch);

        m.add(h);
        add(m);
        add(btnSearch);

    }

    public boolean onClose() {
        System.exit(0);
        return true;
    }

    private MenuItem _viewAboutMenu = new MenuItem(txtMenuAbout, 10, 20)
    {
       public void run()
       {
           UiApplication.getUiApplication().pushScreen(new AboutScreen());
       }
    };

    FieldChangeListener buttonListener = new FieldChangeListener()
    {
        public void fieldChanged(Field field, int context)
        {
            if (field == btnSearch)
            {
                Bitmap borderBitmap = Bitmap.getBitmapResource("rounded.png");
                VerticalFieldManager s = new VerticalFieldManager(MainScreen.NO_VERTICAL_SCROLL);
                s.setBorder(BorderFactory.createBitmapBorder(new XYEdges(12,12,12,12), borderBitmap));

                    for(int in = 0; in < 4; in++)
                    {
                        Name = "Name" + in;

                        String listTitle = Name;
                        String listDesc = "Description: ";
                        String listDesc2 = "Desc: ";

                        info.addElement(new ListRander(displayPicture, listTitle, listDesc, listDesc2));
                    }

                myListView = new CustomListField(info)
                {
                    protected boolean trackwheelClick (int status, int time)
                    {
                        Dialog.alert(" Selected :" + Name);
                        return super.trackwheelClick(status, time);
                    }
                };

                s.add(myListView);
                add(s);
            }
        }
    };
}

and my problem is when I click on the button that show me ListField and context menu... and I do not know how to disable the context menu open...

second problem is:
in this list I generated 4 rows with unique name

for(int in = 0; in < 4; in++)
{
Name = "Name" + in;

String listTitle = Name;
String listDesc = "Description: ";
String listDesc2 = "Desc: ";

info.addElement(new ListRander(displayPicture, listTitle, listDesc, listDesc2));
}

and I want to click on line, so I have to show for this specific line name...

myListView = new CustomListField(info)
{
    protected boolean trackwheelClick (int status, int time)
    {
       Dialog.alert(" Selected :" + Name);
       return super.trackwheelClick(status, time);
    }
};

and I have problem of course that shows me all name lines generated only modified (for example name03).

can you help me please?

Thank you

Stepan

(1) change

btnSearch = new ButtonField ("Search");

TO

btnSearch = new ButtonField ("Search", ButtonField.CONSUME_CLICK);

(2) I would have thought that you want something like

protected boolean trackwheelClick (int status, int time)
{
ListRander selectedLine = (ListRander0 (this.getSekectedIndex ()) info.elementAt;

String name = selectedLine.getName ();

Dialog.Alert ("Selected:" + name);
Return super.trackwheelClick (status, time);
}

Tags: BlackBerry Developers

Similar Questions

  • Right click on the "back" button to see the history? You got to be a joke.

    Every day, it's something new...
    Why the hell see you correspond to remove the arrow on the buttons ' back/forward' that has allowed to look through several pages of previous or next drop VERY PRACTICE? Yes, I am well aware, that you can now achieve through a right-click on the button, but come on, that's just stupid. Nothing of that at all intuitive.
    Stop the deletion of these options. You may want to it a certain way, but that's great for you and you alone. We give users the ability to keep these settings very simple and ridiculous way we want that they.

    You can also hold down the left button of the mouse on the active back or forward button until the list opens.

    You can watch this extension:

  • I lost my preview pane in Apple Mail. I tried various things, including clicking on the small button in the standard view. But I can't move the button to see my preview for the message pane.

    I lost my preview pane in Apple Mail. I tried various things, including clicking on the small button in the standard view. But I can't move the small button to see my preview for an e-mail message pane.

    Mail

    Classic view

    Move the mouse pointer to the 'small' button to the middle of the pane overview and then drag it down to show previews more.

  • whenever I open my email or internet only 3/4 of the screen appears and I can't see / click on the maximize button. I'm on xp. Help, please

    I'm not too good at the technical jargon. Please be gentle with me :)

    Hello

    It seems that your screen resolution is set too low.

    • Close all your programs (if you can't see the close button, right click on the taksbar icon, and then click close)
    • Right-click on an empty part of the desktop and then click Properties
    • Click on the settings tab
    • Move the full screen resolution slider to the right
    • Click OK
    • If you are prompted to confirm the change, click Yes

    Tricky

  • When asked "do you want to enable Network Service list? I continue to by clicking on the button "Activate this", and yet I am not able to see the activities or connections to all networks.

    When asked "do you want to enable Network Service list? I continue to by clicking on the button "Activate this", and yet I am not able to see the activities or connections to all networks. My internet works fine, I just can't see if I am connected or not. Help?

    original title: list of Network Service does not illuminate

    Hi SikDude,

    Please use the Forum of the community for Vista.

    Opening of services by typing services.msc in the search bar and find the list of Network Service. Under properties, set it to automatic.

    Please let us know if we can do something else.

    Matt
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How can I get the InDesign startup window go away when no documents are open so I can see my office? Other then having to click on the red button at the top left.

    How can I get the InDesign startup window go away when no documents are open so I can see my office? Other then having to click on the red button at the top left.

    Hello Janet,.

    Your problem could be solved if you turn off YOUR Application framework in the window Menu.

    Go to window-> part of the Application.

    Kind regards

    Aditi Simard

  • When I click on the menu button, why I can't see the historical option?

    According to the help instructions, in order to remove all or part of the history of my search, I'm supposed to click on the menu button and then select the option of history. However, when I click on the menu button, the story is not listed as one of the options.

    Hi, the button can be in 'other tools and features' in the section Customize the menu. If so, you can drag it to a location of your choice. If it is not visible, try clicking on Restore Defaults - more information - controls customize Firefox, buttons, and toolbars.

    You also bring up history by pressing Ctrl + H. Or you can bring up the menu bar (History tab) temporarily by pressing Alt, or if you want to stay there all the time, then right-click in the tab bar (but not on a tab) and a tick/check bar menu.

    If your question is resolved by this or another answer, please take a minute to let us know. Thank you.

  • Knowledge base of Firefox says that when I click on the button exceptions for blocking popup windows (Tools &gt; options &gt; content) I would like to see a list of allowed sites, but instead, it shows me the websites that are blocked.

    I need to know which sites Web is allowed so that I can remove facebook.om which I allowed to past a video.

    This list shows the sites that are blocked or allowed.

    You can open Facebook, then click on the How do I know if my connection to a Web site is secure? and then press the button "additional information". This opens the Page Info dialog box, go to he Panel permissions and change the option pop up here.

  • Click button to see the Dialog.Alert

    Hello, I'm new to the development of Blackberry and I can't get a SIMPLE dialogue. Alert show on click of a button.  Talk about programming most frustrating I've ever done.  If someone could help me please I would appreciate it a lot!

    ButtonField btnCalc = new ButtonField ("Calculate", ButtonField.FIELD_LEFT |) ButtonField.CONSUME_CLICK);
    btnCalc.setPadding (0, 0, 0, 4);

    FieldChangeListener customListener = new FieldChangeListener() {}
    ' Public Sub fieldChanged (field field, int context) {}
    Dialog.Alert ("Hello");

    }
    };

    btnCalc.setChangeListener (customListener);

    Hello

    class pk extends MainScreen
    {
    pk()
    {
    
        ButtonField btnCalc = new ButtonField("Calculate", ButtonField.FIELD_LEFT | ButtonField.CONSUME_CLICK);
        btnCalc.setPadding(0, 0, 0, 4);
    
        FieldChangeListener customListener = new FieldChangeListener() {
        public void fieldChanged(Field field, int context) {
        Dialog.alert("Hello Pawan");
        }
        };
    
        btnCalc.setChangeListener(customListener);
         add(btnCalc);
    }
    }
    

    Its fine workying. I test. When you click the button, you will get Dialog.alert.

    Thank you
    Pawan

  • When I click with the right button of the mouse on videos from facebook it shows no options for me to copy the link and etc.

    When I click with the right button of the mouse on videos from facebook it shows no options for me to copy the link and etc. It only shows the parameters for the flash player. How can I fix?

    You can find the URL of the thumbnail by following these steps:
    In the context menu, choose {inspect element}.
    Now, you can see the URL in the source down (perhaps you click the small arrow to the left of the line of seledted firstly to show).

  • Context menu (or click on the right button) does not appear in the menu window

    The context menu does not appear in certain sections of the browser.
    If I run the browser in safe mode, it works without problem.
    I tried to reinstall firefox, after uninstalling I also manually deleted everything hidden and visible files - did not help.
    Also I tried the restore mode by default - did not help.

    Here, I put screenshoot.
    Kind regards.

    Sorry for my eng

    Hello

    Try disabling graphics hardware acceleration. As this feature has been added to Firefox, it has gradually improved, but there are still some problems.

    You will have to perhaps restart Firefox for it to take effect, so save any work first (e.g. you compose mail, documents online that you are editing, etc.).

    Then perform the following steps:

    1. Open the Firefox Options (Preferences on Mac or Linux) as follows:

      • In Firefox 29,0 and above, click on the menu button

        then select Options Preferences on Mac or Linux, or Windows.

      • In 28.0 Firefox and earlier versions, click on the Firefox orange upper-left button, then select the 'Options' button or, if there is no button up Firefox, go to tools > Options.
    2. In the window of Firefox Options (or preferences), click on the Advanced tab, and then select general.
    3. You will find in the list of parameters, the checkbox use hardware acceleration when available . Clear this check box.
    4. Now restart Firefox and see if the problems persist.

    In addition, please check the updates for your graphics driver by following the steps in the following knowledge base articles:

    This solve your problems? Please report to us!

    Thank you.

  • Whenever I have press and hold to my left click on the mouse button, it automatically highlights everything from this point to the top of the page

    Whenever I press and my left click without releasing, it atomically highlights everything from this point to the top of the page. Also, note if I'm now left click on the scroll bar, it goes back to the original location, even when I try to drag it upwards or downwards.

    Open internet Explorer and the problem does not occur there.

    Try Firefox Safe mode to see if the problem goes away. Firefox Safe mode is a troubleshooting mode that disables certain parameters, disables most Add-ons (extensions and themes).

    If Firefox is open, you can restart Firefox Safe mode in the Help menu:

    • In Firefox 29,0 and above, click on the menu button

      click Help

      then select restart with disabled modules.

    • In previous versions of Firefox, click on the Firefox button in the upper left of the Firefox window and click help (or click on help in the Menu bar, if you do not have a Firefox button) and click on restart with disabled modules.

    If Firefox is not running, you can start Firefox in Mode safe mode as follows:

    • On Windows: Hold down the SHIFT key when you open the desktop Firefox or shortcut in the start menu.
    • On Mac: Hold the option key during the startup of Firefox.
    • On Linux: Exit Firefox, go to your Terminal and run firefox-safe-mode
      (you may need to specify the installation path of Firefox for example/usr/lib/firefox)

    When the Firefox Safe Mode window appears, select "start mode safe."

    If the issue is not present in Firefox Safe Mode, your problem is probably caused by an extension, and you need to understand that one. Please follow the section Troubleshooting extensions, themes and problems of hardware acceleration to resolve common Firefox problems to find the cause.

    To exit safe mode of Firefox, simply close Firefox and wait a few seconds before you open Firefox for normal use again.

  • We continue to request click on the Tools button, but there seems to be none in ff28.

    Y at - it an option tools in ff28 when changes or adjustments are needed. I noticed that councils support refers many things that do not exist. If I'm a newbie too and missed the obvious, my apologies. Otherwise, please help. It would be a good idea to have a list of changes made to the options available for new migrants to firefox because it would be gutting to go back to IE or chrome. Thank you.

    The 'Tools' button should be on the menu bar. If you don't see the Menu bar not do back the following to get it

    • Press the ALT key.
    • Go to view > toolbars > customize
    • Click on the restore default set
    • Click OK
  • Click on the button "display remote content" content remote does not show. If I go back to e-mail even later "display remote content" is not on the page.

    The "issue" essentially lines the problem.
    No distance shows content when the user clicks on the button "view remote content. Once it has been clicked on a specific email, if I go back to the same email, the button "display remote content" is not on the e-mail page and no remote content shows again in the body of the email.
    I use an updated version (24.4.0) of Thunderbird.

    The problem is often caused by anti programs anti-virus and other security software blocking Thunderbird to get the remote images. The GET for images using a web port usually and some security software not see Thunderbird as a browser and block access.

  • I went to your site to learn how to configure Firfox as my default browser, but when I click on the Firefox button it does not have options.

    When I click on the logo of Firefox in the upper left, it is said that restore, move, size, minimize, maximize, and close. Help, please.

    Hello, go in view > toolbars & UN-see the menu bar - then you will get the default layout with the firefox button in the upper left corner of the window.

Maybe you are looking for