overlapTouchPolicy does not work by label overlaps ImageButton

Hi all

I want to make a button with a custom image and text, what I did was use an ImageButton control to show the background, on which I put a label to display text. Documentation, I learned that I should put it overlapTouchPolicy: OverlapTouchPolicy.Allow on the label for the button receive the click event.  How ever, don't worry: when I click on the label, it does not raise the button click event. Here is the code:

         Container {
             layout: AbsoluteLayout {
             }
             preferredWidth: 768
             preferredHeight: 126

             ImageButton {
                 id: sendButton
                 preferredWidth: 186
                 preferredHeight: 82
                 layoutProperties: AbsoluteLayoutProperties {
                     positionX: 560
                     positionY: 22
                 }
                 defaultImageSource: "images/title_btn_normal.png"
                 pressedImageSource: "images/title_btn_press.png"
                 onClicked: {
                     //do something                 }
             }

             Label {
                 text: qsTr("A button")
                 layoutProperties: AbsoluteLayoutProperties {
                     positionX: 600
                     positionY: 40
                 }
                 overlapTouchPolicy: OverlapTouchPolicy.Allow
             }
         }

Someone has an ideaon how do I fix this?

Thank you

Dong

Hello

You manage the label click event. If you click on the image (not the label), the click event works in your code.

Try the code to handle the click event of the label below:

Container {
        layout: AbsoluteLayout {
        }
        preferredWidth: 768
        preferredHeight: 126
        ImageButton {
            id: sendButton
            preferredWidth: 186
            preferredHeight: 82
            layoutProperties: AbsoluteLayoutProperties {
                positionX: 560
                positionY: 22
            }
            overlapTouchPolicy: OverlapTouchPolicy.Allow
            defaultImageSource: "direction_normal.png"
            pressedImageSource: "direction_over.png"
//            onClicked: {
//            }
        }
        Label {
            id: lbl1
            text: qsTr("A button")
            layoutProperties: AbsoluteLayoutProperties {
                positionX: 600
                positionY: 40
            }
//            overlapTouchPolicy: OverlapTouchPolicy.Allow    // Comment this line
            gestureHandlers: [
                TapHandler {
                    onTapped: {
                        // Handle the label click event
                        //lbl1.text = "label clicked worked..."
                    }
                }
            ]
        }
    }

Thank you

Tags: BlackBerry Developers

Similar Questions

  • The side-by-side function does not work correctly, windows overlap

    original title: sizing windows side-by-side

    The side-by-side function does not work correctly, windows overlap.  How do fix you this feature?

    Hello

    It is Aero Snap.  When you select a window how you "cutting" it in position?  You do not use the window key and the arrow left/right or are you drag / drop window?  If you drag / drop, using the keyboard shortcuts help to solve the problem?

    Kind regards
    Alex T.
    ~ 2007-2011 MVP Windows desktop experience ~

  • DatePicker does not work when it overlaps another field element or text

    Pls help, I finally understand how to to install this datepicker and now it won't let me choose the dates when it overlaps another text field.

    You may need to use the tab key to move through the fields on the page, but it could be a large number of tab as the new fields in the pop-up calendar moved well be the end of the tab list. Also, is not a user-friendly solution.

    There is another routine of date picker that uses dialog object to display the calendar and this dialog window should appear on the fields.

    How can I add a date picker to my web form?

    Response to see Max Wyss and you should be able to communicate with him by e-mail.

  • Firefox does not work with the USPS auto boat web site. Won't print postage labels. Please correct.

    After I entered all the information, select it a service section is not working properly and I can't print a shipping label to the France.

    Select a service type. THIS IS WHERE THE WEB SITE DOES NOT WORK PROPERLY

    Choose a Type of Service
    Type of demand price delivery package
    Enter the details of the package to display the service options.

    Hello

    Many issues of the site can be caused by corrupted cookies or cache. To try to solve these problems, the first step is to clear cookies and cache.
    Note: This will be you temporarily disconnect all sites, you're connected to.
    To clear the cache and cookies to do the following:

    1. Go to Firefox > history > clear recent history or (if no Firefox button is displayed) go to tools > clear recent history.
    2. Under "Time range to clear", select "all".
    3. Now, click the arrow next to details to toggle the active details list.
    4. In the list of details, see the Cache and Cookies and uncheck everything.
    5. Now click the clear now button.

    More information can be found in article to clear your cache, history, and other personal information in Firefox .

    This solve your problems? Please report to us!

    Thank you.

  • now, my home button reads "homeButton.label;" and does not work. Help. Thank you...

    I have on my computer, looked up and saw this "homeButton.label"; on my home button.
    I can't get rid of it in tools etc and it does not work as a command. I press to go home, in this case google, but it does nothing. At the bottom left of the page, it simply says 'Done '.
    I am at a loss to explain it.
    Anyone?
    Thank you
    SL

    You have this problem when running in Firefox SafeMode?
    http://support.Mozilla.com/en-us/KB/safe+mode
    Do not choose anything at the moment, just use 'continue in safe mode.

    If this is not the case, see this:
    http://support.Mozilla.com/en-us/KB/troubleshooting+extensions+and+theme...

  • period overlaps the code does not work in apex page

    Hello

    Employees have a schedule with a start date and end. Calendar periods cannot overlap for the same employee.

    I have a function that returns the error of validation of text as follows:

    declare
    number of l_dummy;

    Start
    Select count (*)
    in l_dummy

    of fus_medewerker_roosters
    where mdr_code =: p61_mdr_code
    and <>id: p61_id
    and to_date(:p61_begin_periode,'DD-MON-YY') < = eind_periode
    and to_date(:p61_eind_periode,'DD-MOn-YY') > = begin_periode
    +;+

    If l_dummy > 0
    then
    Back to 'this employee already has a calendar in this period.';
    on the other
    Returns a null value.
    end if;

    end;

    But the code does not work. It records data of an employee even though the periods overlap.

    But the code works correctly in workshop:

    declare
    number of l_dummy;

    Start
    Select count (*)
    in l_dummy

    of fus_medewerker_roosters
    where mdr_code =: p61_mdr_code
    and <>id: p61_id
    and to_date(:p61_begin_periode,'DD-MON-YY') < = eind_periode
    and to_date(:p61_eind_periode,'DD-MOn-YY') > = begin_periode
    +;+

    If l_dummy > 0
    then
    DBMS_OUTPUT. Put_line ("this employee already has a calendar at this time."); end if;

    end;

    What goes wrong. Why it works very well in the Studio, but not in my page?

    Kind regards
    Diana

    Edited by: dianap on Sep 4, 2009 08:31

    Hi Diana,

    It comes with the following:

    to_date(begin_periode,'DD-MON-YYYY')
    

    and

    to_date(eind_periode,'DD-MON-YYYY')
    

    Here are the dates of the table itself, should not be converted to dates.

    Secondly and more important still, the list of selection of P11_MDR_ID does not return NULL, it returns "null %" - it is a string that should be converted to null.

    I have made a few changes for postings of these - please take a look and check that everything is working ok.

    Andy

  • Option for "warn me when sites try to charge ' does not work?

    Firefox 37.0.1 (and all of my previous installations) for MacOS X 10.7.5.

    I would have thought that such a simple case of reload javascript has been covered. For example, drudgereport.com charge always annoyingly all few minutes in its header:

    var timer = setInterval ("autoRefresh ()", 1000 * 50 * 3);
    function {self.location.reload (true) ;} autoRefresh()

    This does not qualify as a bonefide browser bug?

    The setting in "Options/Preferences > advanced > general" does not work when JavaScript is used to refresh a web page as the drudgereport website uses.

    A possible workaround is to use a bookmarklet to disable this "feature".
    You use the bookmarklet you (re) load the web page.

    javascript:clearInterval(timer);void(autoRefresh=null);
    

    The setting to "Options/Preferences > advanced > general" is designed as an accessibility feature, as you can see by the label of this section, so that people with disabilities or people who use screen readers don't get confused not and is not intended as a security protection to stop to redirect.

    See also:

  • Session manager does not work

    I don't know if this goes in the tabs section or the section modules, so I placed it here in tabs.

    I label mix more and that's what happened to me recently:

    I just started firefox; He asked me to restore the tabs and I said 'yes', but all tabs are empty. I thought it was a mistake, then I closed Firefox and restarted and now the sessions don't ask me if I want to restore the previous session. After playing with it, I've broken down and started a new session. Got the essential and other elements, closed firefox and he asked me if I want to save, and I said 'yes '. When I went to open firefox, nothing happened. He didn't ask me to restore the session or anything like that. I checked the session manager and sessions before that I just do (sessions that were there when the bug happened) were there and the session manager still does not work.

    Thanks for your help.

    You can use updates made to TabMix Plus in the tab of the Add-ons Manager, using the context menu.

    Also, TabMix Plus has its ' own support here forum.
    http://tmp.garyr.NET/forum/

  • "Do not load the tabs up to choosing" does not work

    As I have explained in the title, the option does not work. I tried: safe mode, reset firefox, manual rename/remove the file "prefs.js". None of these has worked.

    Yes.

    This setting is not very clearly labelled and has no effect on the restoration of the tabs automatically when you start Firefox.

    As you can see in the bug report, this parameter was found with the startup parameter.

    • Tools > Options > general > startup: "startup of Firefox:
      "Show my windows and tabs from last time '.
  • Satellite A30, Win XP Pro SP3 - modem does not work

    Another problem with this laptop Satellite A30
    The built-in modem does not work.

    * Explanation: *.
    The driver is correct and downloaded from the Toshiba support site.
    The modem is identified as "Toshiba software modem amr" and is installed on com3 port.

    When I click on "diagnosis" and "ask modem" (right labels can be different, since my is an Italian win xp, I just translated the Italian labels), a window pops up saying: it is impossible to open the door (port), the modem is connected to.

    I tried to change the com port of the modem to different numbers, but the problem is the same.
    I don't know if the modem is a real map connected somehow to the main Board or is built right on the main map. It would be the first case, I may change see ad. BTW, the mini slot pci is already occupied by the gigabyte of Wi - Fi, so the modem must be elsewhere.

    This is strange, since I've done at least 2 other win xp pro on this machine facilities, always download and install the appropriate drivers, and the modem has never worked.
    Thank you
    S.

    Hello

    Have you installed the SP3 Windows XP Home edition, then the drivers or SP1 and later updated to level to the SP3 version?
    > It's strange, because I did it at least 2 other facilities on this machine pro win xp
    What other facilities?

  • Safari search bar does not work. (Mac)

    The search bar of Safari on my MacBook Pro does not work. When you type in the search bar, don't watch anything until I press on enter, after which my search query appears twice in the address bar, once on the left and once in the middle. Often enough, the page does not load, and when I'm on a page, the url of the Web site watch twice, overlapping.

    Attachment, include:

    Anyone of you knows how I might solve this problem.

    Thank you in advance.

    Try the following steps:

    A possible solution to the problem of address bar: disable the Safari Suggestions

  • WIFI does not work after installing WIN7 to HP Pavilion DV1000

    I hope you can help! After the complete collapse of the old WinXp I installed Win7 - mostly away from the ti works. However, WIFI does not work. (P/N is PY869PA #ABG, he also says dv1303ap on the label)

    Is there a driver for the available WLAN? Witout WLAn or internet access good old HP is pretty useless...

    Hi, Andreas:

    Here's what you need to do to get this old Intel Pro 2200 card to work with W7...

    Download the zip version of the driver from the link below.  The first file listed.

    https://Downloadcenter.Intel.com/Detail_Desc.aspx?AGR=Y&DwnldID=15798&lang=eng&OSVersion=Windows%20Vista%2032 * & DownloadType =

    Unzip it into a folder.

    Go to Device Manager and click on the network controller needing drivers.

    Click the driver tab.  Click on set to update driver.

    Select her browse my computer for driver software method and navigate to the driver folder, that you unzipped.

    Make sure that the include subfolders is selected and the driver should install.

  • MSG for error ProgramFiles\SearchExtensions\Client.exe & Avira does not update & Adobe Flash Player does not work

    Hello.  My computer is running XP.  My cpu is Intel Core 2 Duo processor.  Sometimes I use Firefox and Chrome.

    At startup, there is always a prompt that shows "C:\Program Extensions\Client.exe Search make sure that you type the word correctly and try again".  With it, there is a white rectangular black box with label on top "C:\WINDOWS\System32\svchost.exe.  With her, I also noticed my antivirus Avira will be not updated.  It says "Your PC does not work properly", and when I click on "Difficult problem", it says "error" and does not always update.  And with her also, I can't update Adobe Flash Player.  It downloads, and then when I click "Run", he always says 'error' could not retrieve the data it needs.

    I tried to uninstall and install new Avira, and it's always the same problem.  I am also afraid that I can't watch my favorite videos from YT because it requires an update to Adobe Flash Player.

    I searched the internet for problems Client.exe and svchost.exe, and in one of the answers with Client.exe and taskeng.exe problems microsoft, I tried to follow somehow solutions step by step.  They require that you are looking for a task scheduler or folder tasks and I discovered my computer is not all that.  Any Scheduler task and in System32, no task folder.  Because you need to search for files with "rocket" in there and delete it.  Others find it useful.  I don't know if this is the case even with my computer.

    I also try to do a system restore.  He has yet to eliminate the prompt error Client.exe and svchost.exe.  After I did, there is a message box that says "Avira CCPLG. XML file is missing.  I searched the internet, but nowhere, you can download this missing file.

    I hope that my computer has no need of a reformat.  I hate reformatting.  Also, what is ADWCleaner?  Is it advisable?

    Help.  I need "simple" solutions  If you have any other questions regarding this problem, please bear with me, because I'm not a techie.  Hope that everyone out there can help me.

    Thank you.

    Oh Yes...

    Looking at a different Google search results, in addition to deleting "rocket"-oriented tasks, they mention using Autoruns to delete any "rocket" focused on the startup items that you may have:

    https://www.YouTube.com/watch?v=mKchQdXjuPA

    It is a good idea and you can get Autoruns here:

    https://TechNet.Microsoft.com/en-us/sysinternals/bb963902.aspx

    Autoruns is the program Windows msconfig on steroids.

    Just download it, unzip it in our office or somewhere you can find it, run Autoruns.exe, enlarge the window, you can see everything and wait until it finishes populating the list of entries.

    When the Autoruns is finished scanning your system, it will say "Ready" in the lower left corner.  Autoruns can be a little intimidating to first if you have never seen it before because it displays a lot of information.  You are really interested only a few sections.

    Look at everything and log tabs and you can also see your scheduled tasks.  You can also click on the "Find" button (looks like binoculars) and looking for something to do with the 'rocket', and delete them. "."

    The items that appear in a color shrimpy came not "signed" with third party programs, that you have installed, and are not usually a problem.  The manufacturer just didn't "sign" their files properly.

    The items that appear in a yellow color are the entries that point to a file, the path, the place that doesn't exist so that they are a bit suspicious because they probably don't make sense more.  I usually just delete those yellow, but sometimes they come back.

    Autoruns does not install anything on your system - it just runs on request, so you can keep around or remove it when you're done (nothing to uninstall).

  • Activation code does not work

    I bought a computer used compaq laptop with XP Professional.  It's a phone company of Ratheon.    I was not provided the CD original windows XP.  I need to reload the operating system, so I used an other XP Professional CD to install the operating system.  Now the activation from the bottom of the laptop does not work.

    I called the phone number on the activation of windows page, and who does not.
    Because I don't have the original windows XP Professional CD for this laptop, how can I activate windows?

    Hello

    you have the right installation with Windows XP Professional CD, then you will be able to use your product key from the bottom of the laptop.

    Here you can see some COA labels:

    https://SkyDrive.live.com/?CID=23FD66EFD8D06B76&ID=23FD66EFD8D06B76%21113#CID=23FD66EFD8D06B76&ID=23FD66EFD8D06B76%21198

    How you can see on the photo - the COA label is for Windows XP Professional OEM, then you must use with Windows XP Professional OEMCD.

    Here you can see some of the labels cost another:

    https://SkyDrive.live.com/?CID=23FD66EFD8D06B76&ID=23FD66EFD8D06B76%21113#CID=23FD66EFD8D06B76&ID=23FD66EFD8D06B76%21199

    The COA label is for Windows XP Professional FPP, so you cannot use the Windows XP Professional OEMCD.

    You can try calling the 'Microsoft Activation Center:

    http://www.Microsoft.com/licensing/existing-customers/activation-centers.aspx

    and tell the operator your product key - he could tell you what Windows XP installation CD to use with your product key.

    LC

  • I installed Vista in a Virtualbox VM and the product key does not work, how to fix this? I use the same product key supplied with the computer originally.

    I bought a Dell Precision T3400 of Dell Financial Services and it came with Vista Business installed.  I installed a new hard drive and installed Vista in a Virtualbox VM by using the recovery disk that came with the computer, and the product key does not work for activation.  I get a message that says I need to activate Windows, but he says that the product key is not valid.  How can I fix it?

    Thank you

    If you have reinstalled the OEM of Vista Business copy on the new hard drive, as Bill says you can't also use it in a virtual machine.

    You can only reuse your OEM of Vista professional copy if it is no longer used on the computer. Do you have what operating system installed on the new hard drive? It was an upgrade copy or complete the license?

    If you used a license to upgrade to another edition of Windows to replace your copy of company then Vista Business license is still in use (for upgrade) and you cannot reuse it in your virtual machine.

    However if you replaced Vista business with a copy of the full license of another edition then you are able to use the OEM copy in a virtual machine, but only on the same computer. You must use the product key from COA to the label on the computer. The product key is put in the copy OEM cannot find the SLIC table on the host motherboard. You must use the phone activation from within the virtual machine. Click on start in Vista Business and typing "slui 4. Do not meet the audio guests until it asks you if you want to speak to an agent. Explain that you have completely replaced the OEM copy with a copy of the full license of the new windows and now want to use the OEM copy in a virtual machine on the same computer. Agent will then give you the activation string. Remember that the virtual machine is not transferable to any other computer.

    This information is offered by Darin Smith (MSFT) and the team of Windows licenses, November 18, 2011.

Maybe you are looking for