Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

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.

New Developer
Posts: 10
Registered: ‎01-14-2013
My Device: Blackberry 10 Simulator
My Carrier: EE
Accepted Solution

Possible to click on URL in label?



I am making an app that can show comments that people have submitted - I'd like to be able to allow the the user to click on a link in the comments and either open the browser or a webview to that link. 


Is this possible? I've tried searching but I'm not sure on the wording of my request.

Posts: 29
Registered: ‎09-07-2012
My Device: 9900
My Carrier: Airtel

Re: Possible to click on URL in label?

Implement the onTouch event for Label and pass the url to webview in event.isUp() method

onTouch: {
if (event.isUp()) {

webview_id.url = url

webvbiew.visible = true
if (event.isDown() || event.isMove()) {
//display focus
} else {
//undisplay focus


Find the more information about webview here


Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Possible to click on URL in label?

I haven't tried it but if you are using a control that can use a TextStyleDefintion then you can format the text as HTML and since it has the <a> attribute I would surmise it would open a browser, info here...





If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Posts: 262
Registered: ‎07-13-2012
My Device: PlayBook, DA B, DA C, LE Z10 #102, Q10, Z30
My Carrier: T-Mobile

Re: Possible to click on URL in label?

If you use a TextArea (and if you want it to look like a Label, turn editable to false) hyperlinks will be "clickable" and open in the native browser.

Check out my BB10 Cascades Coding site: BBcascades.com & Cascades Blog: bbcascadescode.tumblr.com

My Built for BlackBerry app: The Dive Plan
Posts: 325
Registered: ‎10-01-2012
My Device: Dev Alpha C, Playbook 32 GB
My Carrier: BleskMobil

Re: Possible to click on URL in label?

Most easy way is following:


Label {
text: qsTr("Plese don't hesitate to provide feedback at http://blackberry.hubalek.net")
multiline: true
content.flags: TextContentFlag.ActiveText


content.flags: TextContentFlag.ActiveText does the trick.


If you like my solution please accept my response

-- My Blackberry 10 app at http://blackberry.hubalek.net
-- My Android apps at http://android.hubalek.net