Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
07-09-2012 11:14 AM
I use a button but then no longer require it on the screen, what is the best way to delete/remove the butotn from the present screen in QML? If I have missed how to do this in the documentation please point me that way, I want to rely on the documenation as much as possible before coming to the forums, Thanks all.
07-09-2012 01:46 PM
You could simply set the visibility off, depending on the use case; What happens once the button dissapears, is there a new page/section on the screen that is shown, or you simply want to remove the ability to interact with the button?
07-09-2012 01:57 PM
You could look into the cookbook sample. In the Button Sample at one point if you press the Eat button the Fruit none disappear : https://github.com/blackberry/Cascades-Samples/blo
07-09-2012 02:51 PM
My issue is that even when I set the visibility to zero, it is still there, so clicking there would set off the touch events for the button, not whatever might be beneath the button. For more complex UI like this I feel the C++ work might be more appropriate. I am used to the screen setup of the java development and it is more similar. Can anyone confirm that C++ might offer more customization like this?
07-09-2012 03:01 PM
Have you taken a look a this thread? they are addressing a similar issue with visibility:
What calls are you makign to make the button invisible?
07-09-2012 05:36 PM
I don't know if you've tried this or not but you could also try setting the button enabled property to false. That would stop it from being interacted with while the opacity is set to zero. Depending on your use case this may work. But if there are other controls behind the button that need to accept touches then this might not help.
07-09-2012 08:22 PM - edited 07-09-2012 08:39 PM
07-10-2012 08:24 AM
"enabled" is a property of a Control; for more info, see the Cascades API:
From this page:
Indicates whether the control is enabled.
When a control is disabled, it does not respond to user input. The disabled control continues to receive events, but does not process them. Changing the enabled state may also affect the appearance of the control.
If true the control is enabled, if false it's disabled.