B4J Question textarea top padding [SOLVED]

ilan

Expert
Licensed User
Longtime User
hi

i try to show the text in the textarea node at the top left corner but it has a big padding. if i try to set padding to 0 nothing happens.
how can i set it to be placed at the top left corner?

1656430955779.png


thanx
 

Attachments

  • padding.zip
    2.6 KB · Views: 6
Last edited:

LucaMs

Expert
Licensed User
Longtime User
That doesn't happen to me; can you attach a test project?
 

Attachments

  • TextAreaTest.zip
    2 KB · Views: 8
Upvote 0

ilan

Expert
Licensed User
Longtime User
Upvote 0

ilan

Expert
Licensed User
Longtime User
i guess i have the same issue as this guy here:

 
Upvote 0

ilan

Expert
Licensed User
Longtime User
test with negative values.
B4X:
CSSUtils.SetStyleProperty(TextArea1.As(TextArea),  "-fx-padding", "-1 0 0 0")
View attachment 130905

here it is not working. nothing changes when i add your code. not from the designer and not from the code.
maybe JAVA version?
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
I use the version C:\Java\java-11.0.1\bin\javac.exe
ok just downloaded again the source from the b4j download page and result is the same.
it is really strange that it is working for everybody and not for some users.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
ok i found the toublemaker. i am using at this class B4XDialog. as soon as i disable it i dont even need to add any CSS. B4XDialog is creating this behavior.
will try to create a simple example that shows it
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
i have uploaded an example project to post #1.
it has definitely something to do with the B4XDialog object.

is there a workaround?
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
B4Xdialog Css is changing TeaxArea padding
see:
Dialog.css
CSS:
.text-area .content {
    -fx-padding: 15 5 5 5;
}
yes just saw it too. but why is it not changeable?

anyway i changed it in the b4xlib and now everything is fine. thank you a lot @Omar Parra A.

🙏 🙏 🙏
 
Last edited:
Upvote 0
Top