Issues with TestField and TextArea

50 views
Skip to first unread message

Craig Lang

unread,
Aug 6, 2015, 12:32:45 PM8/6/15
to CodenameOne Discussions
Hi All,

I have found some apparent issues while trying to use the text field and/or text area to create an editor on a mobile device:
1) Even though I set the text area properties to multiline (10 lines), the return doesn't cause the cursor to go to the next line. In effect it's only a single line
2) In the GUI builder, I set the scroll visible with the checkbox in the properties for that object. Yet no scroll bar is visible.
3) I set the vertical alignment to be top and yet when the text box gets the focus (and the cursor is visible), the text is displayed at the center of the field.

Is there something I'm missing or is this a 'feature' in CN1?

Thanx,
 -Craig


Essential Stats
IDE: Eclipse
Desktop OS = Windows 8.1
currently using on Simulator

Craig Lang

unread,
Aug 6, 2015, 1:04:28 PM8/6/15
to CodenameOne Discussions
I noticed it also when trying to write to it using the SetText() method.
The "\n" is ignored.

Shai Almog

unread,
Aug 7, 2015, 12:55:41 AM8/7/15
to CodenameOne Discussions
Use the method: setSingleLineTextArea(false).

Craig Lang

unread,
Aug 7, 2015, 1:36:02 PM8/7/15
to CodenameOne Discussions
Thanks. That takes care of two out of three... :-)

Still can't get the scroll bar to become visible, though.
I am using the method setScrollVisible(true) for the text field. Should scroll bars be visible there?

Shai Almog

unread,
Aug 7, 2015, 1:49:42 PM8/7/15
to CodenameOne Discussions
Scrollbars in Codename One are always in the "as needed" mode so setting them to visible will only make them appear if they are "needed".
What is the parent container of the text field/area? Is it possible its in a scrollable container?

Craig Lang

unread,
Aug 7, 2015, 4:16:50 PM8/7/15
to CodenameOne Discussions
Thanx. That helps.
Turns out that the scrolling was set TRUE on the container.
When I turned that one off, the scrolling worked on the text field.

I did notice that there are no actual scroll bar visible, though, at least in the simulator.



Shai Almog

unread,
Aug 8, 2015, 2:15:06 AM8/8/15
to CodenameOne Discussions
They should fade in/out based on the design/theme.
Reply all
Reply to author
Forward
0 new messages