views:

487

answers:

2

I created a samble checkbox:

<mx:CheckBox label="checkbox"/>

Is there any way to disable checkbox state changing when clicking on it's label? Checkbox should change is's state only when i click [V] but do not change state when i click it's label

+1  A: 

Not using the standard component. You'd probably need to attempt to extand the Checkbox class or create your own component and program the logic yourself.

To be honest though, having the label clickable is the standard behavior of this control and it will make you application more usable if you keep this functionality.

James Hay
hmm... the only solution i found is to use a checkbox with empty label and a text object.thanks anyway
simplemagik
+1  A: 

You should be able to glue a checkbox and a non-interactive label together to get the behavior you're looking for:

 <mx:HBox>
    <mx:CheckBox />
    <mx:Label label="checkbox" width="100%" />
 </mx:HBox>

It's more wordy, but you could probably wrap it up in a Component, if you really want.

eduffy