Question

I am expecting a weird problem with some of the Text fields in my Eclipse-RCP application: when I start typing text in these fields it appears in the reverse order (right-to-left). For instance: typing "hello", appears as "olleh". Even if I put caret to the end of the text it will jump to the beginning, when typing next letter.

All fields are created in the same way, but not all of them have such strange behavior. If I right-click on the field and select "Show Unicode control characters" it does not show that there is a right-to-left bidi character.

Has anyone expected something similar or have any clues of what is wrong with my application?

Was it helpful?

Solution

The problem was solved, so, I am gonna post an answer, in case someone comes across the same problem.

Apparently, orientation was not changed to right_to_left. Initial problem was, that during typing caret was jumping to the beginning of the text field (after each symbol). And the reason for such behavior was, that there were multiple Bindings created for one TextField (sub and parent classes were creating these bindings).

OTHER TIPS

Try text.setOrientation(SWT.LEFT_TO_RIGHT)

Here is the Eclipse Documentation of Text. If this doesn't help, you might try reworking whatever layout you're using; I can't be more specific without an example.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top