I write a program that if I click left button, an image will show up, and
then I use Redraw(), the whole canvas will get redrawn.
Is that possible to redraw a local region on the canvas? Or is that
possible that a wxFrame contain many small wxShapeCanvas objects,
and that they can redraw themselves?
And if shape objects are overlapped, for example, some lines created on an
image. Is that possible to make the area around the image and lines to bind
to mouse events? I want the lines and the image in certain region can
respond to its mouse events.
I write a program that if I click left button, an image will show up, and
then I use Redraw(), the whole canvas will get redrawn.
Is that possible to redraw a local region on the canvas?
Yes, just pass a rectangle to wxWindow.Refresh. Or you can call the
Draw method of the shapes in question, passing a wxClientDC
Or is that
possible that a wxFrame contain many small wxShapeCanvas objects,
and that they can redraw themselves?
Yes, but they can't overlap.
And if shape objects are overlapped, for example, some lines created on an
image. Is that possible to make the area around the image and lines to bind
to mouse events? I want the lines and the image in certain region can
respond to its mouse events.
Each shape can respond to mouse events, just override OnLeftClick or the
other similar methods.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
----- Original Message -----
From: "Robin Dunn" <robin@alldunn.com>
To: <wxPython-users@lists.wxwindows.org>
Sent: Tuesday, November 11, 2003 5:34 AM
Subject: Re: [wxPython-users] About Redraw() and event handler
Frank Chen wrote:
> Hi:
>
> I write a program that if I click left button, an image will show up,
and
> then I use Redraw(), the whole canvas will get redrawn.
> Is that possible to redraw a local region on the canvas?
Yes, just pass a rectangle to wxWindow.Refresh. Or you can call the
Draw method of the shapes in question, passing a wxClientDC
> Or is that
> possible that a wxFrame contain many small wxShapeCanvas objects,
> and that they can redraw themselves?
Yes, but they can't overlap.
>
> And if shape objects are overlapped, for example, some lines created on
an
> image. Is that possible to make the area around the image and lines to
bind
> to mouse events? I want the lines and the image in certain region can
> respond to its mouse events.
Each shape can respond to mouse events, just override OnLeftClick or the
other similar methods.
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org