I have one question might be related to MFC's CRichEditCtrl and
SetParaFormat, and I would appreciate any input.

TextField::Edit is derived from CWindowImpl<TextField::Edit,
CRichEditCtrl, CWinTraits<kDefaultEditStyle> >.

Currently, in RTL UI (for example, Hebrew Chrome), the TextField::Edit
is initialized as right-aligned, but with left-to-right layout.

I am trying to initialize the layout to be right-to-left in RTL UI and
adjust the layout on the fly, which means, if the input text is a pure
LTR text, the layout will be re-set as left-to-right; when there is
RTL character in the text, the layout will be re-set to right-to-
left.  (To make it simple, I will assume the text is not an URL, which
should always have LTR directionality.)

Resetting layout can be achieved by SetParaFormt().

But there is one problem that I could not figure out:

If I type an English character 'a', the layout will be re-set to LTR.
Then, I change the IME to Hebrew and type a Hebrew character, the
layout will be re-set to RTL, and the Hebrew character is placed at
the left side of 'a'. But the IME changed back to English.

I have no idea why IME change back to English.

And looks like it does not matter whether I initialize the
TextField::Edit as LTR layout or RTL layout, after type in the first
Hebrew character following the English character, the IME always
change back to English.

And if I switch the IME to Hebrew again and type in 2nd or more Hebrew
character, the IME will stay as Hebrew.

I'd appreciate if anyone has any idea on what is going on and why.


Thanks,
Xiaomei

Reply

Forward



--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to