Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Backscreen Scrolling
Backscreen Scrolling [message #467050] Mon, 23 January 2006 19:09
Dominic Cubitt is currently offline Dominic CubittFriend
Messages: 2
Registered: July 2009
Junior Member

I am developing an app on the Pocket PC and am having serious problems when
scrolling. There is much flickering and partial redraw when scrolling a
composite containing a few labels and such. This is because the redraw is
called every time.

I am using J9 with 3.2 M4 PPC j2se.

I have tinkered extensively with DOUBLE_BUFFERED and NO_BACKGROUND that do
make some difference, but by no means enough.

I have investigated further; and scrolling of an image seems to work very

So what i want to do is render my component(s) to a backscreen and copy the
appropriate image segment to a canvas for normal drawing.

I have had some success with this using code like:

public void setContent(Composite c){
this.content = c;

void paintControl(PaintEvent e) {
Point contentSize = content.getSize();
GC gc = new GC(content);
Image image = new Image(content.getDisplay(), contentSize.x,
gc.copyArea(image, 0, 0);

gc = e.gc;
gc.drawImage(image, 100, offsetY);

The problem here is that the content component needs to be visible for me to
take an image - this defeats the point in the first place. However the image
to the right scrolls very smoothly despite me taking a new image every time!

I would very much like to build a generic solution to this as scrolling is a
significant feature of the application.

Any advice on how to correctly render component(s) to a backscreen would be
much appreciated.

Previous Topic:sizing Text
Next Topic:How to build EXE for SWT Application
Goto Forum:

Current Time: Fri Sep 25 20:24:59 GMT 2020

Powered by FUDForum. Page generated in 0.02081 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top