Hi, can anyone teach me how to display an image to a wx.staticbitmap using wxpython?
thanks
···
_________________________________________________________________
Get an advanced look at the new version of Windows Live Messenger. http://get.live.com/messenger/overview
kailiang kailiang wrote:
Hi, can anyone teach me how to display an image to a wx.staticbitmap using wxpython?
http://wiki.wxpython.org/index.cgi/wxStaticBitmap
Not updated with "modern" style:
http://wiki.wxpython.org/index.cgi/wxPython_Style_Guide
Or tested on recent versions, but it should still work.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov
If you were using the dabo.ui wrapper for wxPython, you would use a
dImage control, and then the code would be:
img = dabo.ui.dImage(self, Picture="path/to/image/file")
You can resize the image to your needs, and based on the ScaleMode
property, it will either fit to that size proportionally, stretch to
fill the entire size, or clip the image (if the original is larger).
I use a lot of images in my GUI apps, and the Dabo control handles all
the resizing, converting, rotating, etc. by just setting a couple of
simple properties. I'd never go back to the raw wxPython hassle of
dealing with images.
···
On 12/27/06, kailiang kailiang <kailiang88@hotmail.com> wrote:
Hi, can anyone teach me how to display an image to a wx.staticbitmap using
wxpython?
--
# p.d.