Problems with RichEdit20A

Windows specific forum
Kazmirzak
User
User
Posts: 92
Joined: Fri Jun 18, 2004 5:44 pm
Location: Germany

Problems with RichEdit20A

Post by Kazmirzak »

Hy everyone!

I'm writing an editor with simple color highlighting. My program checks a single line, sets the selection to a word (#EM_EXSETSEL) and changes the color of the selection with the command #EM_SETCHARFORMAT.

Everything works fine with "RichEdit", but with "RichEdit20A", the screen scrolls to the selection, so when you write something on the beginning of a long line, and this changes the color on the middle of the line, the screen begins to jump around and you get really confused! BTW I want to use RichEdit20A because it supports multiple UNDO. So is there a possibility to "tell" the RichEdit20A that it shouldn't scroll to the current selection, like the good old "RichEdit" ?
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

use this line to disable the scrolling feature before you do the hilightning:

Code: Select all

SendMessage_(hRichEdit, #EM_SETOPTIONS, #ECOOP_XOR, #ECO_AUTOHSCROLL)
and this one to enable it again afterwards:

Code: Select all

SendMessage_(hRichEdit, #EM_SETOPTIONS, #ECOOP_OR, #ECO_AUTOHSCROLL)
Timo
quidquid Latine dictum sit altum videtur
Post Reply