09-10-2010 07:37 AM
I would like to do following:
- 2 components (textfield, icon) in one row, icon placed right of textfield
- icon should move to the right when text is typed
Basically, it's something similar when trying to make call. Little green phone icon moves to the right while number is typed.
Does anyone know how to achieve this?
Solved! Go to Solution.
09-10-2010 07:44 AM
there is no default component that has this behavior, but i would suggest to take a simple editfield and a bitmapfield and put them into either a simple custom layout manager or to overwrite getPreferredWidth on the editfield.
you change the width of the editfield (either in the layout or as the return value) when something is entered or deleted (use font.getadvance).
09-10-2010 09:18 AM - edited 09-10-2010 09:19 AM
Thx Simon! Before asking on forum I did just what you said but had been unsuccessful. After you confirmed this is the right way I kept going and succeeded