mefjr75 at hotmail.com
Thu Jul 29 06:40:29 CEST 2004
justin__devine at hotmail.com (JDevine) wrote in message news:<f9d01b73.0407271254.427a271a at posting.google.com>...
> I am going through the painfull process of learning wxPython. Sincer
> there is nearly no documentation, I am learning from the demos.
> Unfortunately, I have realized these demos do some specialized
> importing and that all the imports are not applicable. Specifially,
> All I want to do now is insert a bmp I have drawn into a windows
> application. The image clases from the demos are completely
> unexplanatory about how to do this. The "images" module that is
> imported has custom functions for calling a specific set of images
> such as GetTest2Bitmap, which does not help me at all. Please help me
> understand this.
Maybe this will help you.
# SimpleImage ver 1.0
# by M.E.Farmer Jr. 2003
# Utilizes the new wx namespace
# usage: python SimpleImage.py image.jpg
frame = wx.Frame(None, -1, "SimpleImage", size=(-1,-1),pos=(1,1))
# Converts the image into a wx compatible bitmap
pix = wx.Image(sys.argv, wx.BITMAP_TYPE_ANY).ConvertToBitmap()
# Now wx.StaticBitmap() can be used to place that bitmap onto the parent
st = wx.StaticBitmap(frame, -1, pix, pos=(1,1),
app = wx.PySimpleApp()
More information about the Python-list