BackgroundImage not shown in TextArea


I'm trying to display a background image in a TextArea an iPhone, but the image is not shown. I tried to set the image as background for the window and it works, so the image url and the image itself is clearly sane.

var notesTextArea = Ti.UI.createTextArea({
    backgroundColor : '#f0f0f0',
    backgroundImage : 'Images/Backgrounds/background.notes.empty.png',
    value : 'Test'

The background color is correctly shown, the 'Test' string as well.

I'm aware of the problem with the url case-sensitivity of the iOS devices, but as I'm trying this currently on iPhone Simulator (iOS 5.0 / no Retina), this can't be the cause.

The image exists in 320x367 pixels and 640x734 pixels (@2x).

SDK version is 1.7.5

Any ideas?

Thanks in advance!


3 Answers

  • It Works! You just need to set the backgroundColor:'transparent' for the backgroundImage to be displayed!

    — answered 2 years ago by Joseph Sachs
    1 Comment
    • woww super that works, I too face the same problem and resolved by the above answer, thanks.

      — commented 2 years ago by prashanth ns
  • I'm having the same issue. It doesn't look like TextArea honors the backgroundImage property. My current workaround is to create a view with a background image and then add the TextArea to the view:

    var textAreaWrap = Ti.UI.createView({
    var myTextArea = Ti.UI.createTextArea({

    You'll have to finesse the dimensions of the TextArea so it fits inside the view, and potentially turn off any default styles on the TextArea.

  • even at version 3.0.2 latest as of March 12, 2013. this is still a problem.