Hi, I wanted to share the new Jewel TriStateCheckBox control, a Jewel CheckBox, only Js, with 3 states: Checked, Unchecked and Indeterminate.
* It can be configured with the indeterminate look, which we are all used to, or with a rejected look (with a dash symbol in the middle) by setting the rejectedVersion property to true. * By default, the "unchecked" state is assigned a value of "0", the "checked" state a value of "1" and the "indeterminate" state a value of "-1". With the TriStateCheckBoxStatesValues bead we can set a custom value for each state. * To set the state "selected" we use selected=true, to set the state "deselected" we use selected=false, and to set the state "indeterminate" we use indeterminate=true. (indeterminate=false sets the default state to "deselected") * The state can be obtained by retrieving the state property or by using the functions: isChecked(), isUnChecked() and isIndeterminate() * Distinguishes state changes set by code, valueCommit event, from changes made by the user, clickCommit event. * With the TriStateCheckBoxLabelState bead we can display a different text for each state. An example has been added to the TDJ [1] I hope it is useful to you. [1] https://github.com/apache/royale-asjs/blob/develop/examples/jewel/TourDeJewel/src/main/royale/TriStateCheckBoxPlayGround.mxml Hiedra
