5 Replies Latest reply on May 30, 2008 1:36 AM by garag

    Text object

    garag
      Hi,

      is it possible to set the background color of a Text object?

      If no, is there another object in Flex that allows multiline text and for it is possible to set the background color?

      Any suggestion will be appreciated.

      Thank you very much

      Regards
        • 1. Re: Text object
          Gregory Lafrance Level 6
          TextArea
          • 2. Re: Text object
            Gregory Lafrance Level 6
            <?xml version="1.0"?>
            <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml">
            <mx:TextArea backgroundColor="red" text="Black"/>
            </mx:Application>
            • 3. Re: Text object
              garag Level 1
              Hi Greg

              thank you for your answer.

              I have found this solution but I forget to explain a feature I need.

              I can't give the possibility to change the text in the text area.

              So, I have to set the property enable to false and it set automatically the background color to a default color and not to the color that I choose.

              Also, it seems that if enabled is false, I can set also a property named "disabledColor" but it allows me to change only the color of the text but not the color of the textarea background.

              My question is the following: is it possible to avoid that user can change the text and is it also possible to choose the color of the text and to color of the background?

              Regards,

              Thank you


              • 4. Re: Text object
                Doc816 Level 1
                Yes. Instead of using enabled="false" to disable editing of your text area, use editable = "false"

                You will still be able to change the background and text color while the text area is not editable.

                Hope that helps.
                • 5. Re: Text object
                  garag Level 1
                  Hi Doc816,

                  it works perfectly now!!!

                  I didn't know the "editable" properties of text area object.

                  Thank you very much for your help.