Search code examples
apache-flexflex4mxml

Is it Possible to give Flex Canvas editable=false?


Actually my intention is In Flex Application have 10 text input box.

So i'm doing Create Canvas and Place all text inputs into that canvas then i'm define

canvasId.editable=false;

But it is giving error !! i know there is no editable in Canvas...

But it is Possible?


Solution

  • You can work with states. Create two states:

    <s:states>
        <s:State name="stateEditable"/>
        <s:State name="stateReadOnly"/>
    </s:states>
    

    And for each textInput:

    <s:TextInput editable.stateReadOnly="false"/>
    

    Then in actionscript:

    currentState = "stateReadOnly";