Scrolling 
Author Message
 Scrolling

I have a window which displays a combination of text, line graphics, and
pictures.  I want to be able to scroll it up or down.  However, the only
method I can think of to do this is erasing the entire window and then
redrawing from the new location based on the position of the scollmarker
in the scrollbar.  Of course, this produces a horrible flickering.
There has to be a better way to do this.  Any ideas anyone?

Thanks,
    Floyd



Sat, 28 Dec 2002 03:00:00 GMT  
 Scrolling
2 options I know of (which are similar):

1. Draw everything temorarily in a Picture of equal size, then in your
Paint() subroutine just have g.DrawPicture myTempPict,0,0 - this will
GREATLY reduce flickering, but it will still be there because for Paint() to
be called, it must erase the contents first.

and

2. Keep your whole document in a Picture and then use the scrolls to adjust
the starting coordinates of where to view from:

g.DrawPicture
myPicture,0,0,hScroll.Value,vScroll.Value,self.Width,self.Height

This is the method used for like side scrolling arcade games (the entire
level is on a single image). But again, you have the problem of erasing and
redrawing (but this option is even quicker than #1).

Just have your drawing routines in another function, and everytime you
change the values of the scroll, call that (not Refresh). That will
completely get rid of flicker when combined with #1 or #2.

Good luck!
Jeff

Quote:

>I have a window which displays a combination of text, line graphics, and
>pictures.  I want to be able to scroll it up or down.  However, the only
>method I can think of to do this is erasing the entire window and then
>redrawing from the new location based on the position of the scollmarker
>in the scrollbar.  Of course, this produces a horrible flickering.
>There has to be a better way to do this.  Any ideas anyone?

>Thanks,
>    Floyd



Sat, 28 Dec 2002 03:00:00 GMT  
 Scrolling

Quote:

>This is the method used for like side scrolling arcade games (the entire

___I can't believe I used the word "like" here!!!___ Ignore it please while
I remove my own tongue :)

Jeff



Sat, 28 Dec 2002 03:00:00 GMT  
 Scrolling

Quote:

>I have a window which displays a combination of text, line graphics, and
>pictures.  I want to be able to scroll it up or down.

Floyd

Just keep your image(s) in a canvas and then use the canvas.scroll method.

Joe



Thu, 09 Jan 2003 03:00:00 GMT  
 Scrolling
<< >I have a window which displays a combination of text, line graphics, and

Quote:
>pictures.  I want to be able to scroll it up or down.

Floyd

Just keep your image(s) in a canvas and then use the canvas.scroll method.

Joe >>

Since RB has a built-in Reference guide,  I think people may need a more
thorough/detailed explanation than that if they went through the trouble to go
online for an answer. :-)

-Newbie



Sun, 12 Jan 2003 03:00:00 GMT  
 Scrolling

Quote:

> > > I have a window which displays a combination of text, line graphics,
> > > and pictures.  I want to be able to scroll it up or down. Floyd

> > Just keep your image(s) in a canvas and then use the canvas.scroll
> >method.

> > Joe >>

> Since RB has a built-in Reference guide,  I think people may need a more
> thorough/detailed explanation than that if they went through the trouble
> to go online for an answer. :-)

> -Newbie

And you're adding what? :-)

Here's the answer:

Put everything on the window on top of a Canvas control. You can then
use the Canvas' Scroll method to move the items around.

--
"In a world full of lies which tug at the truth
 I'm taking no sides - Now I recognize you."
                                           --DS



Sun, 12 Jan 2003 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Scrolled Window automatically scrolling

2. To scroll or not to scroll?

3. Mouse wheel doesn't scroll text scroll bar

4. only add a scroll bar when the window is minimized and scroll bar is needed

5. Why won't my scrolling canvas scroll?

6. text widget / scroll bar / automatic scrolling

7. SYNCHRONIZED SCROLLING, or, ONE SCROLLBAR TO SCROLL 2CanvasesWindows

8. Scrolling selections and scroll events

9. scrolling text widgets inside a scrolling canvas

10. Is there any way to apply scroll-ability to an image without displaying the scroll-bars?

11. ASPAP: How do you change your scroll bars to be flat scroll bars?

12. scrolling decorator flicker

 

 
Powered by phpBB® Forum Software