Shitu
Shitu

Reputation: 837

Disable selection of a CheckBox in Flex

I have a checkbox defined as below:

<mx:CheckBox id="chkUseAmountDue" change="useAmountDue(event)>

What I want is that it should be displayed, but user should not be able to select or deselect the checkbox. Please suggest.

Upvotes: 0

Views: 152

Answers (1)

Chris
Chris

Reputation: 1174

Use the enabled attribute inherited from UIComponent:

<mx:CheckBox id="chkUseAmountDue" change="useAmountDue(event)" enabled="false">

Typically, instead of 'false' you could use a boolean variable that depends on the state of the app.

Upvotes: 2

Related Questions