I have included my code below. I am trying to size the image to the client area size of a frame and then.draw the jpg image on the client area of the frame.
The code below only produces a frame with a grey background. Why am I not getting my image?
import wx
import os
class Mywin(wx.Frame):
def __init__(self, parent, title):
super(Mywin, self).__init__(parent, title = title,size = (500,300))
back_Image = os.path.dirname(os.path.abspath(__file__)) + '\\Skins\\' + 'picture.jpg'
bmp_Img=wx.Image(back_Image, wx.BITMAP_TYPE_ANY)
frame_size = self.GetSize()
frame_h = frame_size[0]
frame_w = frame_size[1]
final_ImgResized = bmp_Img.Scale(frame_h,frame_w)
wx.dc = wx.ClientDC(self)
wx.dc.DrawBitmap(wx.Bitmap(final_ImgResized),0,0,True)
self.Show(True)
ex = wx.App()
Mywin(None,'Drawing demo')
ex.MainLoop()