I am trying to set the alignment for some TextFields (mainly, to right for numbers), I've been searching in the forum before i create this question, but could not fix my issue.
Unfortunaly i din't catch the solutions. If someone knows how can i fix it, I would be very grateful.
If more information is needed, please let me know.
1. Make sure to use latest version of B4J.
2. You can set the alignment of TextField with the designer or programmatically with the same API as Label or B4XView.
Thanks for your quick response, but I'am afraid that I don't know how to adapt it for my matter, i received the next error message:
Main - 914: Variable 'javaobject' no declarada se utiliza antes de que se le haya asignado cualquier valor.
And in the line:
TextField1.As(JavaObject).RunMethod("setAlignment", Array("CENTER_RIGHT"))
the word JavaObject became red.
And don´t know what to do next.
I appreciate your support, thank you very much
TextField Testing:
Sub Button1_Click
Dim lbl As Label
lbl.Initialize("")
Dim jo As JavaObject = lbl
jo.RunMethod("setTextAlignment", Array("RIGHT"))
TextField1.As(JavaObject).RunMethod("setAlignment", Array("CENTER_RIGHT"))
End Sub
1. Make sure to use latest version of B4J.
2. You can set the alignment of TextField with the designer or programmatically with the same API as Label or B4XView.
I do not have the B4J latest version. I haven't updated due to my concern that my program is affected, but i will do it.
Appreciate your quick support as well, and let you both know the result.
I have it ticked but with version 2.06, may be that´s the problem.
As said to Erel, i'll update the B4J with latest version (9.5) in fact have the version 8.50.