TextArea "fill parent"

27 views
Skip to first unread message

P5music

unread,
Dec 10, 2020, 5:35:14 PM12/10/20
to CodenameOne Discussions
I am trying to have a TextArea in the bottom half of a form with other components at top.
The TA has to be like an editor, so it should be at full size from the start.
Now I experience this:
1-I do not see the TextArea, if I try some mouse clicks about its intended position, at some time, it appears with just one line and tiny scrollbars buttons.
2-If I write multiline text it records my typing and stores into the TA but I see just the tiny one line TA yet
3-if I click somewhere the TA appears the size of the typed lines of text, that is it shows all text I typed, but it is not as large as the available space. it does not "fills" its parent, that is, its container or the left space if no container is used to wrap it.
I tried to set its height but it does not work.

What I have to do?
Maybe I have to use a TableLayout with constraints?
Thanks in advance

Shai Almog

unread,
Dec 11, 2020, 12:05:38 AM12/11/20
to CodenameOne Discussions
I'm not sure I follow you. Can you provide screenshots and source code?
Also the size of the text area is proportional to the skin/density so if the text is small it's possible that this is a high DPI screen so the size on the device would be much larger.

P5music

unread,
Dec 11, 2020, 5:09:15 AM12/11/20
to CodenameOne Discussions
I just want to have the "fill parent" behaviour for the text area.
Here are the images (I can show only the bottom half of the screen)
Notice that the text area grows up, but it does not until I click with mouse, it does not happen while typing a multiline text.
TextArea_issue_image1.PNG
TextArea_issue_image3.PNG
TextArea_issue_image2.PNG

Shai Almog

unread,
Dec 12, 2020, 2:05:32 AM12/12/20
to CodenameOne Discussions
That scrollbar isn't ours. I don't see how this would be generated from our code.

P5music

unread,
Dec 12, 2020, 5:52:57 AM12/12/20
to CodenameOne Discussions
So, said that about the scrollbars, what about the "fill parent" behaviour I need?

Shai Almog

unread,
Dec 12, 2020, 10:04:28 PM12/12/20
to CodenameOne Discussions
In which layout manager?
There's no fill parent, there's only layout managers and some of their behaviors imply fill.
Reply all
Reply to author
Forward
0 new messages