|
|
|
|
TextArea line wrapping - last letters invisible
Posted:
Nov 24, 2009 8:44 AM
|
|
|
Hi. I have a text area that I create like this:
TextArea task = new TextArea();
task.setConstraint(TextArea.UNEDITABLE);
task.setFocusable(false);
task.getStyle().setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_LARGE));
When the line is very loing, the text wraps around to the next line, but the last letter in the first line is invisible, it looks as though it was drawn "outside" the boundries of the area. How can I change this?
Ragards.
|
|
|
|
|
|
|
Re: TextArea line wrapping - last letters invisible
Posted:
Nov 26, 2009 5:16 AM
in response to: szczyp
|
|
|
Are you overriding the scrollbar, using an old version of LWUIT or using a CJK language?
|
|
|
|
|
|
|
|
Re: TextArea line wrapping - last letters invisible
Posted:
Nov 26, 2009 12:10 PM
in response to: vprise
|
|
|
Hi. Thanks for your time.
No, I am not overriding anything, nor am I using CJK. I am using LWUIT 1.2.1 which I downloaded on 20th August (the timestamps make me believe so) - I believe it is the latest one? I am running it on the Sun emulator, MediaControlSkin, on 32bit JDK 1.6.0_17. Also on my phone it behaves the same. Please see the snippet below (imports removed):
public class AreaTest extends MIDlet {
protected void destroyApp(boolean flag) throws MIDletStateChangeException {}
protected void pauseApp() {}
protected void startApp() throws MIDletStateChangeException {
Display.init(this);
Display.getInstance().callSerially(new Runnable() {
public void run() {
new AreaForm().show();
}
});
}
}
class AreaForm extends Form {
public AreaForm() {
super("Test");
setLayout(new BorderLayout());
final TextArea task = new TextArea("AaAaAaAaAa AaAaAaAaA");
task.getStyle().setFont(Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_LARGE));
task.setConstraint(TextArea.UNEDITABLE);
task.setFocusable(false);
addComponent(BorderLayout.CENTER, task);
}
}
If you run it on an emulator, tha second's words last letter A is half visible, half not. When I add any letter to the first word, the area breaks the line on word boundry and looks fine. On my cell phone (Nokia 6300) the screen size is a little different, so I need different contrived example, but the problem stays. I tried to create the area like this: new TextArea("AaAaAaAaAa AaAaAaAaA", 2, 2); because I read somewhere that is might help when the area is explicitly made multi-row, but it doesn't change anything for me. Also, when I comment out the line which sets the font, I still can provide text to simulate this behaviour, it just has to be a little longer.
Thank you and best regards. szczyp
|
|
|
|
|
|
|
|
Re: TextArea line wrapping - last letters invisible
Posted:
Nov 28, 2009 10:51 PM
in response to: szczyp
|
|
|
We only accept issues against SVN trunk (latest sources from today) since its very possible an issue is already fixed.
We don't have the 6300 here, please try to reproduce this with the SprintToolkit 3.x or the WTK 2.5.2/3.0.
|
|
|
|
|
|
|
|
Re: TextArea line wrapping - last letters invisible
Posted:
Dec 4, 2009 10:23 AM
in response to: vprise
|
|
|
I used the sources from today, and the problem still exists. The code I pasted works on WTK2.5.2 and show exactly what I mean. Thanks.
|
|
|
|
|
|
|
|
Re: TextArea line wrapping - last letters invisible
Posted:
Dec 5, 2009 9:20 PM
in response to: szczyp
|
|
|
Still couldn't reproduce on the WTK 2.5.2
|
|
|
|
|
|
|
|
Re: TextArea line wrapping - last letters invisible
Posted:
Dec 6, 2009 4:01 AM
in response to: vprise
|
|
|
Hi. You can't reproduce it because the text fits in one line. You are using some other skin, I am using MediaControlSkin. Please See the attached screenshot. You probably have to make the text longer so that the last letter is on the verge of being wrapped to the next line. Please see here: http://www.freeimagehosting.net/uploads/81bcda6f35.png Thanks for your time. Regards.
P.S How can I attach screens here? Can't see an option for this anywhere.
|
|
|
|
|
|
|
|
Re: TextArea line wrapping - last letters invisible
Posted:
Dec 6, 2009 5:00 AM
in response to: szczyp
|
|
|
Hi, Can you check against the svn again, we have committed a fix for this.
Regards, Chen
lwuit-users@mobileandembedded.org wrote: > Hi. You can't reproduce it because the text fits in one line. You are using some other skin, I am using MediaControlSkin. Please See the attached screenshot. You probably have to make the text longer so that the last letter is on the verge of being wrapped to the next line. Please see here: http://www.freeimagehosting.net/uploads/81bcda6f35.png > Thanks for your time. > Regards. > > P.S How can I attach screens here? Can't see an option for this anywhere. > [Message sent by forum member 'szczyp' ] > > http://forums.java.net/jive/thread.jspa?messageID=374994 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net > For additional commands, e-mail: users-help@lwuit.dev.java.net > > >
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net For additional commands, e-mail: users-help@lwuit.dev.java.net
|
|
|
|
|
|
|
|
Re: TextArea line wrapping - last letters invisible
Posted:
Dec 6, 2009 5:21 AM
in response to: Chen Fishbein
|
|
|
Hi. Looks like it is fixed. Great, thanks a lot! Regards,
|
|
|
|
|