I think that this is not what could be expected ...
Regards,
Thomas
--
Dipl.-Ing. Thomas Zehbe
INGENION GmbH
Kuhweide 6
31552 Apelern
Fon: 05043 / 40 57 90 4
Fax: 05043 / 40 57 90 7
wich contains amongst other elements a wxScrolledWindow, on wich I paint an
image.
Thers is a registerd OnPaint() function:
BEGIN_EVENT_TABLE( igTeilOv, wxPanel )
...
EVT_PAINT( igTeilOv::OnPaint )
...
In the OnPaint() function a wxBitmap is created from the stored wxImage and
drawn to the wxPaintDC:
wxPaintDC dc(mDcPanel);
mDcPanel->DoPrepareDC(dc);
dc.DrawBitmap( wxBitmap(*mImage), 0, 0, true );
where mDcPanel is a Pointer to the wxScrolledWindow :-) (it's just a test
routine).
The virtual size of the scrolleWindow is set to the size of the picture which
should be rendered. If it's to large for the window scrollbars appear.
Under Linux the picture is automatically redrawn when it is scrolled. Under
Windows not.
Is it a bug or a feature? Do I something wrong?
But what shouldn't work definitly works on Linux ...
Thanks,
The Panel's paint event is for painting on the panel, not the scrolled
window. If you want to have the scrolled window updated correctly then
you should give it a EVT_PAINT handler and draw the bitmap there.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
Probably because scrolling the scrolled window somehow causes the panel
(or part of it) to be invalidated so your EVT_PAINT handler happened to
be called at the right time to make it appear to be working properly.
--