Recent

Author Topic: The issue of the scroll bar jumping when inputting TRichMemo in Chinese  (Read 4301 times)

jianwt

  • Full Member
  • ***
  • Posts: 164
I'm very sorry. When rvk reminded me just now, I took a look at the project environment and corrected that it wasn't in GTK2 state. (It's because I didn't look carefully and was careless. I thought my project was in GTK2, but I just checked it and found it wasn't. I'm sorry!!)

I uploaded both the files for saving and importing RTF.

@rvk.

I also tried using Microsoft's Chinese input method, but this phenomenon still occurred. But sometimes this problem doesn't occur.

There are many Chinese input methods. I have used three of them, and this phenomenon occurred in all of them.

There won't be any problem loading this RTF file. Copying the text we posted won't show up either. It only appears in the input state of the Chinese input method.


« Last Edit: July 17, 2025, 01:20:49 pm by jianwt »

rvk

  • Hero Member
  • *****
  • Posts: 6938
I can confirm the problem.

For me it's only if the edit isn't entirely scrolled to the bottom. So there is a little scroll left and the cursor is too close to the bottom of the edit. Then the IME somehow scrolls the complete text away to "make room" for the pulldown.

It also happens in Delphi although there it seems I need to get the space at the bottom even smaller (and is even harder) to reproduce the problem.
Wordpad doesn't have the problem.


The second time I tried in Delphi/TRichEdit I couldn't reproduce it anymore... until... I set my cursor and scrolled the text so the cursor was out of view. Then when typing the IME kicked in and did the same weird scroll. So that confirms IME sends out a scroll signal to the edit to make sure the text is in view.

BTW: The scrollbar itself doesn't have any influence on the problem. It happens with and without scrollbars.

BTW #2: I also noticed that the OnKeyPress doesn't work with IME. It just eats that event  %)

I was thinking about solutions and the only thing I can come up with is making sure there is enough space at the bottom before the IME kickes in. The problem is... with what event? The OnKeyDown is executed later and OnKeyPress is eaten entirely.

Before looking at that... can you confirm that if you make sure you scroll all the way down (so really doing mouse-wheel down before typing), that that leaves enough space and the scrolling does not occur???

Thaddy

  • Hero Member
  • *****
  • Posts: 18726
  • To Europe: simply sell USA bonds: dollar collapses
I would suggest, although unrelated to the issue, ask the guys that maintain cnPack. They are experts on such issues.
https://cnpack.org/index.php?lang=en
They helped me out with some Chinese languages problems in the past and are very friendly.
(I am aware of some political difficulties, though)
« Last Edit: July 17, 2025, 03:45:17 pm by Thaddy »
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

 

TinyPortal © 2005-2018