I need to make a label in flex as if you click on it you can open a specific URL let us say Google.
Any ideas?
regards.
In order to add a hyperlink, we can bind the label text with a button that makes it clickable. The open_new (url) method is used to define the function that opens a web browser to follow the link.
This topic teaches how to add hyperlinks (URLs) to a table. You use Power BI Desktop to add hyperlinks (URLs) to a dataset. You can add those hyperlinks to your report tables and matrixes in either Power BI Desktop or the Power BI service.
Enter the hyperlink in double quotation marks. e.g. And note that this alone doesn't make the label "clickable". Sure, if you click on it (assuming everything runs as expected), it will open another tab but it won't do alternate hover and pressed behavior like normal links do.
The open_new (url) method is defined in the webbrowser module in Python which can be imported in the notebook using 'import webbrowser'. Running the above code will display a Label text with a URL. The displayed window will show a hyperlink which upon clicking will redirect the user to the website: www.tutorialspoint.com
Here is sample:
<fx:Script>
<![CDATA[
import flash.net.navigateToURL;
protected function clickHandler(event:MouseEvent):void
{
var urlReq:URLRequest = new URLRequest("http://www.google.com");
navigateToURL(urlReq, "_self");
}
]]>
</fx:Script>
<s:Label x="110" y="149" text="Open Google" click="clickHandler(event)"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With