Hi friends
I need to write text from right to left, so could any one guide me to achieve it.
Is it possible to do with simple Form without canvas.
Thank in advance
Anil
Hi friends
I need to write text from right to left, so could any one guide me to achieve it.
Is it possible to do with simple Form without canvas.
Thank in advance
Anil
You can do it by extending the input component class and every time you enter a character reverse the complete string and update the input field.
Regards,
Harsha
Hi harsha
Thanks for your reply,
Actually with Canvas I did like this.
for Up/right/Down/Left keys (by checking Canvas.Up,Canvas.DOWN.. in keyPressed()) , I able to display the entered key in reverse order like when i used UP(U),RIGHT(R),DOWN(D),LEFT(L) keys I displayed L D R U as per my requirement. All I did by extending Canvas
Now I dont want to use Canvas, So is it possible to do without canvas ?.
I have taken a simple class extending midlet and placed a TextField in Form and displayed the form.. from this onwards without using canvas i want to achieve.
you mentitioned "extending the input component " can u tell me those class name to extend and guide in this scenario.
Thanks in advance
Anil
Create a class say MyTextField and extend the class with TextField and override the methods of that class as per your requirement.
Then create a TextField component as:
TextField tf=new MyTextField();
Check this link for TextField Component details..
Regards,
Harsha
Based on this known issue, http://www.developer.nokia.com/Commu..._(Known_Issue), there seem to be support for right-to-left writing languages, though apparently sometimes it is broken.
So if you are working on supporting right-to-left languages, it may "pop-in" automatically when you change the input mode.
If you set the RTL(RIGHT to LEFT) locale to Hebrew or Arabic on the devices (devices of that region which support it), you will be able to enter all text in default MIDP textfield and textArea RTL mode.
Else the trick is to reverse the string in textArea or textField on every change, using data change listener.
what have you done so far? any code? I too working over j2me application with URDU (right to left) writing, I only found some issue of spacing and rest of the things were absolutely fine. If you have some other issue explain that, so would be easy to post answer! Good luck