Ty for answer. I mean if i input 5281 I want textfield to show 1825 also ( i figured out how to align right with your answer ty )I dont know if I understood your question correctly but try this
Dim a As TextField
a.TextAlignment=a.ALIGNMENT_RIGHT
narek
Sub myTextView_TextChanged (OldText As String, NewText As String)
dim no as NativeObject = Me
no.RunMethod("SetToRight:",Array(myTextView))
End Sub
#If OBJC
-(void) SetToRight: (UITextField *)myTextField
{
[myTextField setBaseWritingDirection:UITextWritingDirectionRightToLeft forRange:[myTextField textRangeFromPosition:[myTextField beginningOfDocument] toPosition:[myTextField endOfDocument]]];
}
#End if
will try and report back Thank you !NOT TESTED
try this.
I recommend to put Dim no as NativeObject = me in Process_GlobalsB4X:Sub myTextView_TextChanged (OldText As String, NewText As String) dim no as NativeObject = Me no.RunMethod("SetToRight:",Array(myTextView)) End Sub #If OBJC -(void) SetToRight: (UITextField *)myTextField { [myTextField setBaseWritingDirection:UITextWritingDirectionRightToLeft forRange:[myTextField textRangeFromPosition:[myTextField beginningOfDocument] toPosition:[myTextField endOfDocument]]]; } #End if
I tried it now . it makes the textfield start from right ty but i also need this: when i write hello it rights hello at the right but i want it to write reverse : olleh from rgiht to left is it also possible ?NOT TESTED
try this.
I recommend to put Dim no as NativeObject = me in Process_GlobalsB4X:Sub myTextView_TextChanged (OldText As String, NewText As String) dim no as NativeObject = Me no.RunMethod("SetToRight:",Array(myTextView)) End Sub #If OBJC -(void) SetToRight: (UITextField *)myTextField { [myTextField setBaseWritingDirection:UITextWritingDirectionRightToLeft forRange:[myTextField textRangeFromPosition:[myTextField beginningOfDocument] toPosition:[myTextField endOfDocument]]]; } #End if