Board index » delphi » No scrolling in RichEdit

No scrolling in RichEdit

Hello,
I'm doing some text editing in a RichEdit control (coloring), and therefore
I need to select portions of text, set the SelAttr's, and unselect them
again. But when I do this, the RichEdit goes wild, scrolling to the selected
text, when the text is in the non-visible part of the RichEdit. So, the
question: how do I prevent this automatic scrolling?
I can't use Begin- and EndUpdate, because this causes the RichEdit to
flicker.

Thanks

Gilles.

 

Re:No scrolling in RichEdit


Try LockWindowUpdate(RichEdit1.handle) before doing your changes
and LockWindowUpdate(0) after you are through.

Quote
De Kapitein <kapit...@theship.com> wrote in message

news:8mokcp$7e8$1@porthos.nl.uu.net...
Quote
> Hello,
> I'm doing some text editing in a RichEdit control (coloring), and therefore
> I need to select portions of text, set the SelAttr's, and unselect them
> again. But when I do this, the RichEdit goes wild, scrolling to the selected
> text, when the text is in the non-visible part of the RichEdit. So, the
> question: how do I prevent this automatic scrolling?
> I can't use Begin- and EndUpdate, because this causes the RichEdit to
> flicker.

> Thanks

> Gilles.

Re:No scrolling in RichEdit


Thanks, but this makes the proces twice as slow. Strange, because I want the
system to do less, not more.

Thanks anyway,

Gilles.

Quote
MrBaseball34 <beware_the_mat...@hotmail.com> wrote in message

news:8mp13702nr2@news2.newsguy.com...
Quote
> Try LockWindowUpdate(RichEdit1.handle) before doing your changes
> and LockWindowUpdate(0) after you are through.

> De Kapitein <kapit...@theship.com> wrote in message
> news:8mokcp$7e8$1@porthos.nl.uu.net...
> > Hello,
> > I'm doing some text editing in a RichEdit control (coloring), and
therefore
> > I need to select portions of text, set the SelAttr's, and unselect them
> > again. But when I do this, the RichEdit goes wild, scrolling to the
selected
> > text, when the text is in the non-visible part of the RichEdit. So, the
> > question: how do I prevent this automatic scrolling?
> > I can't use Begin- and EndUpdate, because this causes the RichEdit to
> > flicker.

> > Thanks

> > Gilles.

Re:No scrolling in RichEdit


Hi

U?ytkownik De Kapitein <kapit...@theship.com> w wiadomo?ci do grup
dyskusyjnych napisa3:8mr7bv$fv...@porthos.nl.uu.net...

Quote
> Thanks, but this makes the proces twice as slow. Strange, because I want
the
> system to do less, not more.

Using SelAttributes _is_ slow.
Try to make changes directly in rtf text (with an auxiliary StringStream).

--
Georg
jerzy.szczes...@ep.com.pl

Other Threads