I am new to XOJO, have worked on Microsoft MFC, SDK and Centura/ Gupta Sql.
My initial experience - got blown away with XOJO, this is an amazing tool, very light weight and works excellent.
I am developing a Desk top application with support for Arabic and Hebrew, I am able to save and display the texts properly. I would want to set the data entry direction property to Right to Left as Arabic and Hebrew are written that way.
I was going through the property list but could not find this.
Appreciate any help in this regard.
I may be wrong but I believe this is not built in. On OSX you should be able to enable RTL with a declare:
I would put it together for you if I wasn’t travelling but I don’t have access to my computer right now.
I’m guessing there are equivalent declares available on Windows and Linux platforms but I wouldn’t know them.
On OS X with the Arabic or Hebrew keyboard, a TextArea allows automatically entry right to left. This is automatic and depends on the language you enter.
I just checked under Windows, it is the same.
Of course, when using right to left languages, you also have to set text alignment right justified.
Hi thanks for your replies.
My requirement is that I have two fields in screen which captures names in Arabic/ Hebrew, so I need to enable the RTL property for two fields ONLY, other fields would be in English!
Jason, would appreciate if you can put me the code!!
You did not mention if you application is for Windows or Mac, but I do use Arabic text entry fields for both platforms and in most cases it is not necessary to do anything special to achieve basic functionality. As you had noticed, Xojo does not have any RTL and LTR text direction property settings.
Mac: textfields work contextually according to the native direction of the text being entered. There is also a longstanding issue in Cocoa with text alignment settings not being respected <https://xojo.com/issue/22051> and hopefully someday we shall see this fixed.
Windows: the Arabic, Farsi, Hebrew or Urdu characters will enter in the correct direction but you will notice that the left / right arrow keys move the insertion point in the opposite direction. Using a declare to set RTL text direction will fix this but so far I did not find a chance to write one.
Probably easy to fix in the Keydown event.