wxpython display jpg in a frame

Cliff Wells logiplex at qwest.net
Tue Jul 22 17:16:07 EDT 2003


On Tue, 2003-07-22 at 12:32, max4 wrote:
> hello
> i would like to know if there is a good tutorial about how to do this
> or if someone could explain
> [ i want to add a jpg to an existing about dialog]


Capture the PAINT event and use a PaintDC to draw to the dialog:

class MyDialog(wx.Dialog):
    def __init__(self, ...):
        ...
        EVT_PAINT(self, self.OnPaint)


    def OnPaint(self, event):
        dc = wxPaintDC(self)
        dc.DrawBitmap(bitmap, ...)
        event.Skip()
	

BTW, questions about wxPython are better asked on the wxPython list:

http://www.wxpython.org/maillist.php

Regards,

-- 
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726  (800) 735-0555






More information about the Python-list mailing list