Discussion:
Refresh wxImage in wxPanel
(too old to reply)
Gianluca
2009-09-07 06:24:03 UTC
Permalink
Hi all,

I'm using the simple class at http://wiki.wxwidgets.org/An_image_panel
(the class with resize fuction) in my software, to add some image
through wxPanel.
Now, I'd like to add some method to manage and edit the loaded image;
for example I want to rotate the loaded image.
How I can refresh/reload the the image loaded in object construction?
I've to trigger the wxPaintEvent? And if yes, how to trigger it?

Thanks in advance
Vadim Zeitlin
2009-09-10 15:09:58 UTC
Permalink
Post by Gianluca
How I can refresh/reload the the image loaded in object construction?
I've to trigger the wxPaintEvent?
Yes.
Post by Gianluca
And if yes, how to trigger it?
By calling wxWindow::Refresh(). By default it will redraw the entire
window which is inefficient so you should find out the rectangle occupied
just by the image you ant to refresh and pass it to this function.

Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
Loading...