02-07-2013 05:30 AM
I'm facing a little problem on my Blackberry 10 Cascade app.
I have a TextField and the hintText is a little bit too long to fit into the TextField.
Instead of being cut at then end (which would be the behaviour I expected), the hintText is split in 2 lines (the second line being cut since it doesn't fit in the TextField in height).
I could change my hintText so that it fits but the TextField can be resized in my UI. Plus, I would like to have something that works great for all screen sizes.
Anybody has a solution ?
02-07-2013 07:45 AM
Hint text is best suited for short hints. I usually place long descriptions below TextField in a Label with gray color and smaller font like in device Settings menus. The label can be multiline.
To simplify reuse I created a CustomControl subclass which contains a title, a textfield (or another control) and a description with 3 setters: setTitle, setValue, setDescription. When title is empty, the title label is hidden etc.