Search code examples
codenameone

Codename one: TextField to keep some space during input


How can i make my textFields that the user input does not start exactly at the margin, like when one starts to type some input some space is left, and also some TextFields that have a HintIcon i want the icon to remain there when user is typing the input.... but let it not be captured when getting the text like .getText(). Any help is appreciated


Solution

  • What you're looking for is padding not margin. It increases the space within the component from it's edges. Simply increase that number to achieve additional spacing.