problem with the onclick toolbar do not work

Hi, I can not do this control works very well. I can see the toolbar, but I can't make a click and the event do not work. Thank you.

  ToolbarManager tbManager = new ToolbarManager(Field.USE_ALL_WIDTH);

            StringProvider spTest = new StringProvider("Test button");
            Image myImage = ImageFactory.createImage(barraTXON);
            ToolbarButtonField tbbTest = new ToolbarButtonField(myImage,spTest);

              tbbTest.setCommand(new Command(new CommandHandler(){
                public void execute(ReadOnlyCommandMetadata metadata, Object context)
                 {
                     Dialog.inform("Toolbar button clicked");
                 }
            }));

            tbManager.add(tbbTest);

            StringProvider spTest2 = new StringProvider("Test button2");
            Image myImage2 = ImageFactory.createImage(barraPAON);
            ToolbarButtonField tbbTest2 = new ToolbarButtonField(myImage2,spTest2);
              tbbTest2.setCommand(new Command(new CommandHandler(){
                public void execute(ReadOnlyCommandMetadata metadata, Object context)
                 {
                     Dialog.inform("Toolbar button clicked");
                 }
            }));

            tbManager.add(tbbTest2);
            if (tbbTest.isFocus()){
                Dialog.inform("Toolbar button clicked1-");
            }

            if (tbbTest2.isFocus()){
                Dialog.inform("Toolbar button clicked2-");
            }

            //with the line below - no action is displayed when clicking on the button
            setStatus(tbManager);

    }

I have to use a panel of buttons.

HorizontalFieldManager buttonPanel = new HorizontalFieldManager(Field.FIELD_TOP | Field.USE_ALL_WIDTH);

      //  Background background = BackgroundFactory.createBitmapBackground(barraTXON);
        buttonTX = new CustomButtonImage(barraTXOFF,barraTXON,barraTXOFF);
        buttonPanel.add(buttonTX);

Tags: BlackBerry Developers

Similar Questions

  • the problem with the wi - fi does not work on windows 8.1

    Hello dear forum users (sorry for the English, use a translator)

    I have a laptop HP Pavilion dv6-7055er, 8.1 Windows 64-bit

    Card Broadcom WiFi 802.11b/g/n 1 x 1 4313GN worked on windows 7, but fails on windows 8.1. Tried to find the driver on the broadcom , but not found. Device Manager indicates that the problem with a PCI device. Specifies no problems with the Wi - Fi adapter.

    What could be the cause and how to fix it? Thank you!

    It seems that your WIFI adapter is not supported by Windows 8.1

    There are a few options available.

    The first and simplest is to purchase a USB wifi adapter to plug into one of the USB ports on the laptop. I have a dual ASUS USB-AC56 band that meets the 802.11ac specification.

    The second option will be to take a look at the installed optional wifi adapters to see if they have Windows 8.1 supports, buy one to replace the Broadcom card installed with.

    Ok. The two following adapters are compatible with your laptop and Windows 8.1. They have a BIOS support.

    The Qualcomm Atheros AR9485

    The Intel Centrino Advanced - N 6230 WLAN module

  • Firefox 6 is a disaster, not only the google toolbar does not work but also yahoo toolbar

    I've updated to firefox 6 and now my yahoo toolbar does not work. It was first the google toolbar is not compatible with firefox 5 now the yahoo toolbar does not work HELP?

    See this - http://help.yahoo.com/l/us/yahoo/toolbar/toolbar2ff/troubleshootff/;_ylt=Akw3jVWwVDlujfQI3kFVqduJsHdG

    Check and tell if you are able to solve the problem.

  • Problem with the Access toolbar buttons

    Hi, I have a problem with the Access toolbar buttons. instead of icons, it shows just 2 boxes, as we get police unknown boxes. Help, please.

    Hi, I have a problem with the Access toolbar buttons. instead of icons, it shows just 2 boxes, as we get police unknown boxes. Help, please.

    Hello

    Those who are not traditional icons they are symbols that belong to the Segoe UI police.

    See the following Web site for an excellent tutorial to solve this problem.

    [SOLVED] Unknown character or vertical Rectangles are appearing in place of metro icons in the Windows 8 start screen and login screen - tweaking with Vishal:

    http://www.askvg.com/fix-unknown-characters-or-vertical-rectangles-are-showing-in-place-of-Metro-icons-in-Windows-8-start-screen-and-login-screen/

    Let us know if it works for you.

    Concerning

  • I have the latest version of FF and the latest version of Roboform... everything has worked perfectly until an hour ago... now the Robofrom toolbar will not work... its

    I have the latest version of FF and the latest version of Roboform... everything has worked perfectly until an hour ago... now the Robofrom toolbar will not work... says not compatible... it is activated in Add ons... nothing has been put to day or changedf suddenly just no toolbar and it will not tie

    RoboForm will probably have an update for Firefox 30 when Firefox 30 is actually out, if not sooner. No need to turn off the automatic updates now.

  • When I try to establish a wifi connection, it shows that the problem with the network card is not fixed. How can I solve this problem?

    When I try to establish a wifi connection, it shows that the problem with the network card is not fixed. How can I solve this problem?

    Hello

    Thank you for writing to Microsoft Communities.

    Until we start troubleshooting on this issue please provides us additional information by answering a few questions, this will help us better solutions to the problems.

    1. What is the full error message do you get?

    2. are - that you be able to access or connect to the Internet via wired?

    3 have there been recent changes to the computer before the show?

    Please go ahead and follow the steps mentioned and later a update on the State of the question.

    Method 1:
    Try to run the network troubleshooters. Check if it enumerates and helps resolve the errors.
    http://Windows.Microsoft.com/en-us/Windows7/open-networking-troubleshooters

    Method 2: If the problem persists, try to follow the steps from the link.

    In the Windows wireless network connection problems:
    http://Windows.Microsoft.com/en-us/Windows/help/wired-and-wireless-network-connection-problems-in-Windows

    Check this link for more information:

    How can I troubleshoot network card? http://Windows.Microsoft.com/en-us/Windows7/fix-network-adapter-problems

    Why can't I connect to the Internet?
    http://Windows.Microsoft.com/en-us/Windows7/why-can-t-I-connect-to-the-Internet

    Please follow these recommended steps and post if you still experience the problem.

  • I have a problem with the HP Deskjet2545 do not print on the computer.

    Printer does not print. Computer says "printer error". Convenience store said that the problem is resolved. The printer is 'ready' doesnot even impression. What is the solution?

    Original title: hpDeskjet2545.

    Hi Matt,

    Thanks for posting your query in the Microsoft Community.

    Printers to print documents, photos, cards and calendars. You have a problem with the printer doesn't work is not on the computer. It can be difficult when something that is important to you does not work as expected. It's pretty simple and we're here to help you solve the problem. We work as a team and get this sorted out.

    Please answer these questions-

    (1) what is the exact error message?

    (2) have you tried the troubleshooting steps?

    (3) what is the version of Windows installed on the computer?

    (4) have you made changes on the computer before the show?

    I would like more information about the issue.

    Note: assuming that you are running Windows 7, I would like to suggest some troubleshooting steps.

    Method 1-

    I would have you look at the article-

    Why can I not print?

    http://Windows.Microsoft.com/en-us/Windows7/why-cant-I-print

    Solve printer problems

    http://Windows.Microsoft.com/en-us/Windows/printer-problems-in-Windows-help#fix-printer-problems=Windows-7&V1H=win8tab1&V2H=win7tab1&V3H=winvistatab1&v4h=winxptab1

    Method 2-

    I wish that you uninstall and reinstall the printer.

    See the article-

    Install a printer

    http://Windows.Microsoft.com/en-us/Windows7/install-a-printer

    Method 3-

    I would have you go through the troubleshooting proposed by HP guide.

    Check out the link-

    http://h10025.www1.HP.com/ewfrf/wc/documentSubCategory?tmp_task=solveCategory&LC=en&DLC=en&cc=us&product=3571292

    Let us know if you need assistance regarding the issue. We will be happy to help you. We at Microsoft, strive for excellence and provide our customers with the best support.

    Thank you.

  • Change password with the password token does not work

    My mother lost her password. So, we asked an e-mail with a password token and clicked on the link in the mail. Responses from the site sorry this token of password is not recognized, please try retyping or get password another token. Then we have copied and pasted the token giving the same result.

    We did this three days after another. So every day we ask you an email with a password token, and every day the site said us sorry this token of password is not recognized, please try retyping or get password another token.

    The system of resetting password with a token does not, at least not in the Netherlands. Does anyone have an idea how to solve this problem?

    Sorry, but the mentioned page asks you to connect with your name Skype and password, so that we cannot further. My mother has a balance of Skype credit that she doesn't use anymore.

    What is the problem with the password reset procedure?

    OK, after a very good conversation with Cherry B we discovered that the account is a Windows Live account, then we should change the password in Windows Live. The password reset procedure could mention this...

  • I am running Windows XP and I'm trying to upgrade to Windows 7. There seems to be a problem with the administrator no no not the permission to create a file?

    I am running windows XP.  I try to install the upgrade to windows 7.  I was on the phone with technical support of 4 - 5 times, and they may not always help.  There seems to be a problem with the administrator and with not not permission to create a file?  I have a HP desktop computer. Can anyone help?

    original title: help with Windows 7 install

    Hello

    ·         Account administrator that you use?

    ·         You have the disc to install Windows 7 or upgrade disk?

    Follow these steps and check if that helps.

    Step 1:

    To see if your PC is ready for Windows 7, download free Windows 7 Upgrade Advisor. It scans your PC for potential issues with your hardware, devices, installed programs and recommends what to do before upgrade you.

    Windows 7 Upgrade Advisor

    http://Windows.Microsoft.com/en-us/Windows/downloads/Upgrade-Advisor

    Step 2:

    Follow the exact steps in this article and check if that helps.

    Upgrade Windows XP to Windows 7

    http://Windows.Microsoft.com/en-us/Windows7/help/upgrading-from-Windows-XP-to-Windows-7

    Note: Make sure that you back up all important data on the computer before you install Windows 7.

  • I have exactly the same problem with the radial program point not to let me install mcafee what should I do?

    I'm having the same exact problem with the point radial program does not let me install mcAfee which can do?

    There is some information about this here: https://community.mcafee.com/thread/19119?start=0&tstart=0

    If this does not help, contact McAfee technical support. They should help you.

  • a text box is every moment that I edited dynamically scroll bar upward. I know that's not a problem with the Web site because she works with other browsers

    There is a problem with scrolling of a text box bar. whenever it is changed dynamically developing area moves upward instead to keep the focus in the area of the new inserted text. even if I move it down to hand it back again.

    OK, I have fixed the code in my program. When I finished the editing, I use this code in javascript.
    document.getElementById("chatMainTxt").scrollTop = document.getElementById ("chatMainTxt") .scrollHeight;

  • Communication with the niVisa (GPIB) do not work next to a serial interface

    Hello

    I programmed an application in C++ (Visual C++ with MFC, running on XP). On the one hand, I control devices of different measure (also from different suppliers). All communication is done with niVisa (Version 4.6). On the other side, I send remote commands to a generator via the serial interface. To do this, I use CSerialPort, it's a Wrapper MFC of the Windows API. Thus, niVisa is not used for the serial connection.

    It works without any problem until I connect the measurement equipment (any type of) via Ethernet.

    When I now connect the scope via GPIB (I use a NI PCI-GPIB), communication works without any problem as long as I wouldn't send anything on RS232. After I send something to my generator (and close the com-port), the next Commander of VISA will give me an error (VI_ERROR_ABORT). Now, I can log in again and everything works normally again (until I have again send something on the com-port).

    For me, it's a really strange question. Any ideas? Any help?

    Best regards

    Michael

    OK, I finally found the problem.

    When you use the serial port, you can write data with normal writing (WriteFile()) function or with the tip (WriteFileEx()). Do not now ask me for more details on the difference, it's something with the mode "" overlap...

    After I send all the data with WriteFileEx, VISA-connection via GPIB produces an error. So I went to the basis of WriteFile() and everything works. Don't ask my consistency betwenn VISA (with GPIB and just GBIB) and the connection series. I'm just happy right now...

    Michael

  • Problems with the Microsoft updates do not install it.

    I have a new laptop HP DV6 with Windows 7.  I also have protection of Norton 360 on this machine, as well as the Microsoft Office 2010 beta on this computer.  From the beginning to use the new system, I receive regular automatic update of Windows to download updates; which I host regularly.  The next day, I installed Office 2010 - beta, I got two reviews of next update:

    1. Update for Microsoft Office 2010 file Validation - beta (KB976133), 32-bit expansion
    2 update for Microsoft Works 9 (KB967044)

    The problem I'm having is that when I try to install these updates, I get the following error message for downloads once they do not install:

    CODE 646 Windows update encountered an unknown error.

    None of the available online or troubleshooting fixes seem to work, and automatic update of Windows continues to find and warn me about updates to these 2.  The same problem occurs whenever I try to install downloads.

    Tonight, I got 2 other notice of update as well as the 2 that will not be installed; at the present time, all other updates seems to install just fine. For (at least) one of these updates of the problem seems to be a security update, my system runs into a problem installing them because of the software Norton 360?  Any help you can give me to get these updates installed or quit appearing through Windows automatic updates?

    Thank you

    Marc, please post here for assistance: http://social.technet.microsoft.com/Forums/en-US/office2010/threads ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • Continue with the next line does not work

    I work a book with a title paragraph style which has "solidarity 1 line" checked, but many positions are left alone at the bottom of the pages.  What Miss me?  I used InDesign for years and I don't remember having this problem before.

    Yes, correct style is applied and not substitutions.

    I have discovered the problem.  A non-rubrique paragraph was unduly option selected keep who seems to have been dominant, or in conflict with the option to keep your head.

  • the resizing of the google toolbar does not work

    I can't resize the google toolbar. There is nothing in front of or behind it. When I hoover on the bar and arrows, he says is no longer resize. When I click on the arrows and the bar and try to move my minamizes of the entire screen. Can someone tell me please how to fix this problem. I had the problem since firefox 3

    Sorry, but the problem isn't with the Google - Firefox toolbar Addon. Google support is where you should look for support. http://support.Google.com/toolbar/?hl=en

    Have you tried to re - install?

Maybe you are looking for