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: 98
Last edited:

ilan

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

 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
test with negative values.
B4X:
CSSUtils.SetStyleProperty(TextArea1.As(TextArea),  "-fx-padding", "-1 0 0 0")
1656443996652.png
 
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
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