Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » how to force a paint event?
how to force a paint event? [message #454450] Thu, 21 April 2005 04:21 Go to next message
Eclipse UserFriend
Originally posted by: simon.ou.edu

Hi...

I have the following code. The key is that I update an integer array
(dPointArray) so that drawPolyline paints this on a canvas. How do I
force this paint event to occur programatically? Thanks for your help.

Regards...

Miguel.



compositeToDraw = new Composite(compositeData, SWT.NONE);

final Rectangle clientArea = compositeToDraw.getClientArea();
final Canvas canvas = new Canvas(compositeToDraw,SWT.NO_REDRAW_RESIZE);
compositeToDraw.addPaintListener(new PaintListener()
{ public void paintControl( PaintEvent e )
{
e.gc.drawPolyline(dPointArray);
}
});
Re: how to force a paint event? [message #454462 is a reply to message #454450] Thu, 21 April 2005 11:04 Go to previous message
Robert Bacs is currently offline Robert BacsFriend
Messages: 165
Registered: July 2009
Senior Member
Just call the redraw() method.

Boby

"Miguel Simon" <simon@ou.edu> wrote in message
news:d479qh$490$1@news.eclipse.org...
> Hi...
>
> I have the following code. The key is that I update an integer array
> (dPointArray) so that drawPolyline paints this on a canvas. How do I
> force this paint event to occur programatically? Thanks for your help.
>
> Regards...
>
> Miguel.
>
>
>
> compositeToDraw = new Composite(compositeData, SWT.NONE);
>
> final Rectangle clientArea = compositeToDraw.getClientArea();
> final Canvas canvas = new Canvas(compositeToDraw,SWT.NO_REDRAW_RESIZE);
> compositeToDraw.addPaintListener(new PaintListener()
> { public void paintControl( PaintEvent e )
> {
> e.gc.drawPolyline(dPointArray);
> }
> });
>
>
Previous Topic:TableHeader listener
Next Topic:resize composite inside a scrolled composite
Goto Forum:
  


Current Time: Wed Apr 24 21:23:17 GMT 2024

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

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

Back to the top