[TIMOB-137] vertical align on textfields?
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2011-04-15T02:24:11.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Kevin Holland |
Assignee | Reggie Seagraves |
Created | 2011-04-15T02:24:11.000+0000 |
Updated | 2017-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 :)
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 :)
Mooted by changes in codebase since then.
Closing ticket as invalid.