Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>For others who come across this later, I made my own custom component that just hides the checkbox for the third state and replaces it with an image that looks like a checkbox in the third state. This is really easy to implement:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"&gt; &lt;fx:Script&gt; &lt;![CDATA[ public static const BOX_CHECKED:int = 1; public static const BOX_REJECTED:int = -1; public static const BOX_UNCHECKED:int = 0; [Bindable] public var boxVisible:Boolean = true; [Bindable] public var enum_id:int = -1; protected function checkbox_clickHandler(event:MouseEvent):void { if(!checkbox.selected) boxVisible = false; } protected function image_clickHandler(event:MouseEvent):void { boxVisible = true; } public function set label(str:String):void { checkbox.label = str; xLabel.text = str; } public function get boxState():int { if(checkbox.selected) return BOX_CHECKED; else if(redX.visible) return BOX_REJECTED; return BOX_UNCHECKED; } ]]&gt; &lt;/fx:Script&gt; &lt;fx:Declarations&gt; &lt;!-- Place non-visual elements (e.g., services, value objects) here --&gt; &lt;/fx:Declarations&gt; &lt;s:CheckBox id="checkbox" click="checkbox_clickHandler(event)" visible="{boxVisible}" includeInLayout="{boxVisible}"/&gt; &lt;s:HGroup&gt; &lt;s:Image id="redX" source="@Embed('assets/icons/redX.png')" width="16" height="16" click="image_clickHandler(event)" visible="{!boxVisible}" includeInLayout="{!boxVisible}"/&gt; &lt;s:Label id="xLabel" visible="{!boxVisible}" includeInLayout="{!boxVisible}" paddingTop="4"/&gt; &lt;/s:HGroup&gt; &lt;/s:Group&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload