trichview.com

trichview.support




Re: flicker when update text then rescrolling


Return to index


Author

Message

Allan

Posted: 06/27/2003 23:23:51


richview1.Clear;

richview1.AddFromNewLine etc.......


The problem seens to be that since the text isn't actually modified, but

cleared and reentered, therefore I have to use an integer to remember the

scrollbar pos.


The scrollbar disappears after .clear, reappears at top when the text is

recreated, then the scrollbar shifts down again, hence the flicker (and the

text "jumps").


Thanks

Allan

>What's the code in redoView?

>

>Format does not scroll to the beginning. It tries to retain the original

>vertical scrollbar position, if it's possible.

>

>

>>

>> I'm running a RichView component with formatted text.

>>

>> When certain events are triggered the text would be regenerated and then

>> scrolls back to the old position. (To make text look like it updated

>without

>> moving)

>>

>> eg:

>> var

>>   scroll:Integer;

>>

>> scroll := richview1.VScrollpos;

>> redoView;  //Changes the text in richview1

>> richview1.format;

>> richview1.VScrollPos := scroll;

>> richview1.repaint;

>>

>> The text scrolls to its old position fine, but it flickers since the

>editor(and

>> scrollbar) moves to the top, then jumps down to its old position again.

>>

>> Is there a way to update the text and move the scrollbar back down without

>> refreshing the component (so visually its still showing the old text),

and

>> once all that is done do one refresh to make it show the new text with

it

>> scrolled in the correct position already?

>>

>> Thanks for the help

>> Allan

>

>





Powered by ABC Amber Outlook Express Converter