Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-137] vertical align on textfields?

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2011-04-15T02:24:11.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterKevin Holland
AssigneeReggie Seagraves
Created2011-04-15T02:24:11.000+0000
Updated2017-03-09T21:04:27.000+0000

Description

I have a textfield and i noticed that "backgroundImage" is not listed on the api, yet it works for a textfield. The issue i am having though is that you can give it padding, but the text always aligns itself vertically along the top of the text field so my text looks all lop sided because i want a bit of padding around the text and the border of my text graphic.

@@@ button code var email_input = Titanium.UI.createTextField({

    id: 'email_input',
    value: 'email',
    color: '#dddddd',
    backgroundImage: 'images/input_background.png',
    clearOnEdit: true,
    textAlign: 'center'
});

@@@ html for padding
<div id="email_input" style="height: 30px; width: 237px; padding: 10px 5px 10px; margin: 10px 32px 0px;"></div>

i will attach the graphic as well

if it's not a bug then ignore, if there's a way to do it currently then yay :)

Comments

  1. Kevin Holland 2011-04-15

    I have worked around it by wrapping an outer div around the input's placeholder and working some css magic to put a background imnage on the outer div, then giving the input itself no background color. It appears to work, but i'm having the images take a tiny lag of delay before they show up. looking into ways to pre-load those.

    I'm not sure if this is the recommended way or if there's a way to get it on the input itself thats a little cleaner. I am currently working around it :)

  2. Blain Hamon 2011-04-15

    Mooted by changes in codebase since then.

  3. Lee Morris 2017-03-09

    Closing ticket as invalid.

JSON Source