How to refresh the canvas

Thanks Frank.
It worked.

With ragrds
Kamesh Jayachandran

···

-----Original Message-----
From: Frank Miles <fpm@u.washington.edu>
To: wxPython-users@lists.wxwindows.org
Date: Tue, 6 Jan 2004 07:58:23 -0800 (PST)
Subject: Re: [wxPython-users] How to refresh the canvas

On Tue, 6 Jan 2004, kamesh jayachandran wrote:

Hi,
I have one wxWindows application which draws the ogl shapes over the wxCanvas.
When I delete the shapes they get actually deleted but the canvas still shows those shapes.
I could realize the deletion only if I resize/(minimize/maximize) the window.

How to refresh the canvas as soon as I delete the shape?

The way I do it is derived from one of the tutorials IIRC:

  self.diagram.RemoveShape(shape)
  shape.RemoveFromCanvas(self)
  self.Refresh(False, bounds)

where 'bounds' is a wxRect large enough to cover the area of the shape,
and self is a class derived from wxShapeCanvas.

HTH --

  -frank

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org