Its a while since I had to work on canvases but I will have to return to my main GUI based project in the new year which uses many canvases, so I would very much appreciate if you could send me your optimisations and tips etc. I wrote my own generic code for canvas scrolling a few years back , when I needed to - but always felt a bit unsatisfied with my solution and having to do it all in the first place:
A) because I actually felt RS should have provided more built in features to handle this sort of stuff ( such as being able to draw to a 2D/3D surface once and have RB automatically redraw a specified "window" from this space and handle the scrolling automatically. Surely there has to be a better way to do this than the current framework. B) maybe someone else knows how to do this better :) Maybe RB canvases have moved on since I last had to use them ( v 5.5 ) but I remember feeling that a lot of this stuff could in 90% of apps have been better handled intrinsically by RB. So hers my question: is the current implementation of canvase optimal ? does it need to be reformed ? Rewritten? Just evolved ? On 11/12/06 21:56, "Paul Rehill" <[EMAIL PROTECTED]> wrote: > Hi all > > I had a problem with scrolling canvases using one large canvas as I > described in my email below last month. I thought I should mention > that I found no quick solution to my problem so I decided to bite the > bullet, and rework the graphics drawing on a single canvas only, > drawing what was needed (as Joe Strout so rightly recommended a couple > of years ago). So in effect, I have virtual scrolling with no flicker > at all now and am removing all instances of refresh and replacing it > with a call to a redraw method that invokes the single canvas's paint > method. I found Aaron Ballman's sample RB project on a double > buffered canvas useful in understanding a flicker free approach as > well. > > Regards > > Paul > > On 11/19/06, Paul Rehill <[EMAIL PROTECTED]> wrote: >> Hi >> >> I have a demo version of RB2004R4 for Windows and moved an RB 5.5.5 >> project into it. I like the new RB interface. >> >> The project has a big canvas used to scroll other canvases that are >> created on the fly using a control array. The big canvas is locked to >> the edges of the window it resides in. >> >> The problem I haven't solved at the moment is the canvases created >> using a control array don't scroll as desired. They appear to sit on >> on top of the other in the window as the big canvas is scrolled. >> >> I tested RB2004R4's canvas scrolling ability in a new project to make >> sure there are no obvious bugs I could spot. I set up three push >> buttons to scroll up canvas controls, scroll down canvas controls and >> with the third push button creating a canvas control on the fly. It >> appears to be working fine. >> >> Returning back to the converted RB 5.5.5 project, the control array >> canvas controls appear to be within the big canvas's bounds and so I >> think they should scroll. I have placed an extra canvas control on >> the big canvas to observe and make sure scrolling is still working and >> it is and the extra canvas moved up and down. >> >> So I am wondering if this may be a 5.5.5 to 2004R4 project conversion >> issue related to the imported canvas control (or its super canvas >> control class) and if anyone else has experienced something similar >> and knows what to do. >> >> I will continue to try different things to get scrolling to work again >> but would appreciate any suggestions that might help. >> >> Thanks >> >> Paul Rehill >> mathsteacher.com.au >> RB2004R4 >> RB 5.5.5 Mac Pro, Mac OS 10.3.6 >> RB 5.5.5 Win Standard, Win XP SP2 >> Plugins used: MBS >> RealBasic resources: RB Developer, Matt Neuburg's RB book > _______________________________________________ > Unsubscribe or switch delivery mode: > <http://www.realsoftware.com/support/listmanager/> > > Search the archives of this list here: > <http://support.realsoftware.com/listarchives/lists.html> > _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
