The problem when using CreateTextEdit

24 views
Skip to first unread message

DogPlanner GSS

unread,
Dec 10, 2025, 4:49:01 AM (4 days ago) Dec 10
to DroidScript
Dear developers,

I have a question about CreateTextEdit. When I use it the text in the field is written with an indent at the top and nothing helps.

    edt = app.CreateTextEdit( "100", 0.2, 0.1, "str" );
    edt.SetTextSize(25);
    edt.SetPosition(0, 0, 0.2, 0.1);
    layHoriz.AddChild( edt ); 

You can see the problem in the attached file. Can you explain why this is? Maybe I'm writing something down incorrectly? I wrote this without SetPosition the result was the same.

Thank you very much in advance.
Screenshot_with question.png

Alan Hendry

unread,
Dec 10, 2025, 12:17:49 PM (4 days ago) Dec 10
to DroidScript
HI,
(SetPosition for TextEdit doesn't seem to be in the docs.)
For Text it shows that the parent layout should be absolute, 
and the parms are left, top, width, height, mode,
so yours should be at 0,0
I'd check the control, parent layout (and its parent ...)
for position, margins, padding, childmargins.
Setting background colours can clarify, 
or Android Developer Settings has "show layout bounds"
Regards, Alan H

DogPlanner GSS

unread,
Dec 11, 2025, 5:07:42 AM (3 days ago) Dec 11
to DroidScript
Dear Alan,

thank you very much for your answer! I will check these.

Have a nice day.

Best regards
Dmitry

среда, 10 декабря 2025 г. в 20:17:49 UTC+3, hendr...@gmail.com:
Reply all
Reply to author
Forward
0 new messages