Desktop - Change RightToLeft property

Erel

B4X founder
Staff member
Licensed User
Longtime User
Most of the desktop controls support both (default) left to right fonts and right to left fonts like Hebrew and Arabic.
You can use the Door library with the following code to change this property:
B4X:
'obj is an Object.
Sub App_Start
    Form1.Show
    SetRTL("textbox1")
End Sub

Sub SetRTL(crl)
    obj.New1(false)
    obj.FromControl(crl)
    obj.SetProperty("RightToLeft","Yes")
End Sub
Sub SetLTR(crl)
    obj.New1(false)
    obj.FromControl(crl)
    obj.SetProperty("RightToLeft","No")
End Sub
 

ayman12

Member
Licensed User
:sign0085:
In WM6.0 on Device
it is not work and says
An error occured on Sub __main_setrtl.

NullReferenceExeption
Continue?
 

ayman12

Member
Licensed User
Thanks Erel for you quick response.
I will try to work around Right to Left issues.
If I found solution I 'll send.
 
Top