Image as Label with Checkbox in Flex -


i want use image in checkbox label, know how ?

when tried doing same thing radiobutton while back, ended having create own component. did:

iconradiobutton.mxml

<?xml version="1.0" encoding="utf-8"?> <mx:hbox xmlns:mx="http://www.adobe.com/2006/mxml">     <mx:script>     <![cdata[         import mx.controls.radiobuttongroup;          [bindable]         public var imglabel:class;          [bindable]         public var groupname:radiobuttongroup;          [bindable]         public var selected:boolean;          [bindable]         public var value:string;          ]]>     </mx:script>     <mx:radiobutton          id="radiobtn"         group="{groupname}"         groupname="{groupname}"         selected="{selected}"         label=""         value="{value}"         visible="{visible}"         includeinlayout="{includeinlayout}" />     <mx:image source="{imglabel}" click="{radiobtn.selected = true}" /> </mx:hbox> 

then use this:

<?xml version="1.0" encoding="utf-8"?> <mx:application      xmlns:mx="http://www.adobe.com/2006/mxml"      xmlns:controls="com.example.controls.*"> <controls:iconradiobutton      groupname="{group}"      imglabel="{assetsfactory.getinstance().iconccvisa}"      value="{creditcardtypes.visa}" /> ... 

hope maybe gets started or gives ideas.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -