Display text as a hyperlink in Flex

<mx:VBox id="paSenate" label="PA Senate" width="100%" verticalGap="0"> <mx:HBox> <mx:Label text="PA Senate" fontWeight="bold"></mx:Label> <mx:Label id="paSenateConf" text="" /> </mx:HBox> <mx:Label id="paSenateNameLabel" text="" paddingLeft="5"/> <mx:Label id="paSenateCountyLabel" text="" paddingLeft="5"/> <mx:Label id="paSenateURLLabel" text="" paddingLeft="5"/> </mx:VBox> 

The code above displays search results based on a search by address. All information displayed comes from a database or web service. Including web address for Senate and House members. The website is returned as a string. Now it is just simply passed to the paSenateURLLabel text field. I need to somehow change it to a hyperlink so that it is interactive. This is done in Flex 3.5. Not quite sure how I will do this.

+4
source share
1 answer

Flex 3 has a LinkButton component that will do this. (Note: if you are using Flex 4, you simply create a text skin for Button or use TLF text that has hyperlink functionality.)

 <mx:LinkButton label="I'm a link" click="linkClickhandler()" /> 
+4
source

Source: https://habr.com/ru/post/1432805/


All Articles