05-14-2009 03:49 AM
How to make a TextField with (TextField.NO_EDIT_MODE_INPUT | TextField.READONLY) wrappable like this:
If 'to' string is less than a specific width (~screen width) then it's only singleline, if more then it is multiline.
Solved! Go to Solution.
05-14-2009 04:21 AM
I see no easy way like providing a constant in constructor.
You need to create your own custom field for such purposes.
05-14-2009 04:32 AM
Hi,
Instead of using single textField you can use One LabelField and One TextField if it fits you requirement.
Here is the code for it
HorizontalFieldManager managerHorz = new HorizontalFieldManager();
VerticalFieldManager managerVert1 = new VerticalFieldManager();
VerticalFieldManager managerVert2 = new VerticalFieldManager();
LabelField objLabel = new LabelField("ORANGE"){
public void paint(Graphics g){
g.setColor(Color.RED);
super.paint(g);
}
};
managerVert1.add(objLabel);
BasicEditField objBasic = new BasicEditField();
managerVert2.add(objBasic);
managerHorz.add(managerVert1);
managerHorz.add(managerVert2);
add(managerHorz);
05-14-2009 04:55 AM
05-14-2009 05:14 AM
Hi,
See this thread.
05-14-2009 05:25 AM
Give a look at this KB article too.